620. Not Boring Movies
UnknownView on LeetCode
Problem Overview
SQL: filter id%2=1 (odd id) and description not "boring", order by rating descending.
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 descWas this solution helpful?
Related Problems
- 176. Second Highest Salary(Unknown)
- 178. Rank Scores(Unknown)
- 180. Consecutive Numbers(Unknown)
- 627. Swap Salary(Unknown)
- 1873. Calculate Special Bonus(Unknown)
- 2889. Reshape Data Pivot(Unknown)