Skip to content
We areTOP 1%

Not Boring Movies

EasyLeetCodeSQL: SELECT & Filtering
Solve on LeetCode(opens in a new tab)
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews
Hint and exampleShow

Combine an odd-number test such as MOD(id, 2) = 1 with a text inequality, and sort the result in descending order.

Example: songs(id, genre, plays)

id | genre | plays
1  | pop   | 90
2  | rock  | 70
3  | remix | 95
5  | jazz  | 40
SELECT *
FROM songs
WHERE MOD(id, 2) = 1 AND genre <> 'remix'
ORDER BY plays DESC;   -- returns id 1, then id 5

More in SQL: SELECT & Filtering

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account