脚本宝典收集整理的这篇文章主要介绍了Leetcode PHP题解--D27 620. Not Boring Movies,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
620. Not Boring Movies
题目链接
题目分析
前面铺垫了那么多,要求就在这:
movies wITh an odd numbered ID and a description that is not 'boring'. Order the result by rating.
返回id为偶数、description不是boring的结果,并且按rating排序。
思路
返回偶数id的结果,这个比较简单,除以2去余就好了:id%2=1
;
description
不能是boring
,也很简单description not like 'boring'
;
根据rating
排序:order by rating
。
最终代码
# Write your MySQL query statement below
SELECT * From cinema WHERE id%2=1 AND description NOT LIKE 'boring' ORDER BY rating DESC;
以上是脚本宝典为你收集整理的Leetcode PHP题解--D27 620. Not Boring Movies全部内容,希望文章能够帮你解决Leetcode PHP题解--D27 620. Not Boring Movies所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。