<aside> 💡

Project Overview:

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>


Problem Description:

Table: Cinema

The task was to:

  1. Select movies with odd-numbered ids.
  2. Exclude movies with the description "boring".
  3. Order the results by rating in descending order.

Solution:

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;


Explanation:

  1. Filter for Odd-Numbered IDs:
  2. Exclude "Boring" Descriptions: