<aside> 💡
This project demonstrates filtering and sorting data in a movie database. The task was to identify movies with odd-numbered IDs and descriptions that are not "boring," and to return the results ordered by rating in descending order.
</aside>
The task was to:
ids."boring".rating in descending order.The query filters and sorts the data to meet the criteria.
SELECT *
FROM Cinema c
WHERE MOD(c.id, 2) != 0
AND c.description != 'boring'
ORDER BY c.rating DESC;
MOD(c.id, 2) != 0 checks if the id is odd. If the modulo of id divided by 2 is not 0, the id is odd.c.description != 'boring' ensures movies with the description "boring" are excluded.