Not Boring Movies
Task: Report the movies with an odd-numbered ID and a description that is not “boring”. Order by rating DESC.
Table: Cinema
+-------------+--------------+
| Column Name | Type |
+-------------+--------------+
| id | INT |
| movie | varchar(255) |
| description | varchar(255) |
| rating | float |
+-------------+--------------+
Input: Cinema table:
+----+------------+-------------+--------+
| id | movie | description | rating |
+----+------------+-------------+--------+
| 1 | War | great 3D | 8.9 |
| 2 | Science | fiction | 8.5 |
| 3 | irish | boring | 6.2 |
| 4 | Ice song | Fantacy | 8.6 |
| 5 | House card | Interesting | 9.1 |
+----+------------+-------------+--------+
Output:
+----+------------+-------------+--------+
| id | movie | description | rating |
+----+------------+-------------+--------+
| 5 | House card | Interesting | 9.1 |
| 1 | War | great 3D | 8.9 |
+----+------------+-------------+--------+ View Reference Solution & Explanation ▼
This query filters the table using basic `SELECT` and `WHERE` clauses to match the exact conditions specified in the problem.
SELECT * FROM Cinema WHERE id % 2 = 1 AND description != 'boring' ORDER BY rating DESC;