1. 程式人生 > >【leetcode】620. Not Boring Movies

【leetcode】620. Not Boring Movies

97.66%(如果改為id%2=1則變為91.13% ,因此與python一樣,若是判斷範圍更大,則效率會更高)

# Write your MySQL query statement below
select id,movie,description,rating
from cinema
where id%2>0 and description!='boring'
order by rating DESC

——————————————————

mod函式明顯效率更低下

41.61%

# Write your MySQL query statement below
select id,movie,description,rating
from cinema
where mod(id,2)=1 and description!='boring'
order by rating DESC
————————————————