620. Not Boring Movies
UnknownView on LeetCode
Advertisement
Intuition
SQL: filter id%2=1 (odd id) and description not "boring", order by rating descending.
Algorithm
- 1SELECT * FROM cinema WHERE id % 2 = 1 AND description != "boring" ORDER BY rating DESC.
Common Pitfalls
- •Use != or <> for "not boring". ORDER BY rating DESC for descending.
620.sql
MySQL
/* Write your T-SQL query statement below */
select * from Cinema
where id % 2 = 1
and description != 'boring'
order by rating descAdvertisement
Was this solution helpful?