#89. [LeetCode / MySQL] 620. Not Boring Movies

문제

 

입력 코드

1. MOD

SELECT *
FROM Cinema
WHERE (MOD(id, 2) = 1) AND (description != 'boring')
ORDER BY rating DESC;

 

2. %

SELECT *
FROM Cinema
WHERE (id % 2 = 1) AND (description != 'boring')
ORDER BY rating DESC;

 

코드 설명

#SELECT #MOD #ORDER BY #%

 

 

문제 출처

 

Not Boring Movies - LeetCode

Can you solve this real interview question? Not Boring Movies - Table: Cinema +----------------+----------+ | Column Name | Type | +----------------+----------+ | id | int | | movie | varchar | | description | varchar | | rating | float | +----------------

leetcode.com