LeetCode - 620. Not Boring Movies
X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and descriptions.
Please write a SQL query to output movies with an odd numbered ID and a description that is not 'boring'. Order the result by rating.
For example, table cinema
:
+---------+-----------+--------------+-----------+
| id | movie | description | rating |
+---------+-----------+--------------+-----------+
| 1 | War | great 3D | 8.9 |
| 2 | Science | fiction | 8.5 |
| 3 | irish | boring | 6.2 |
| 4 | Ice song | Fantacy | 8.6 |
| 5 | House card| Interesting| 9.1 |
+---------+-----------+--------------+-----------+
For the example above, the output should be:
+---------+-----------+--------------+-----------+
| id | movie | description | rating |
+---------+-----------+--------------+-----------+
| 5 | House card| Interesting| 9.1 |
| 1 | War | great 3D | 8.9 |
+---------+-----------+--------------+-----------+
# Write your MySQL query statement below
select * from cinema where description != 'boring' and (id % 2) = 1 group by rating desc
LeetCode - 620. Not Boring Movies的更多相关文章
- leetcode 620. Not Boring Movies 用where语句判断
https://leetcode.com/problems/not-boring-movies/description/ 不管题目简不简单,现在先熟悉语法. 直接用where语句判断即可,判断奇偶可以 ...
- LeetCode: 620 Not Boring Movies(easy)
题目: X city opened a new cinema, many people would like to go to this cinema. The cinema also gives o ...
- LeetCode 620. Not Boring Movies (有趣的电影)
题目标签: 题目给了我们一个 cinema 表格, 让我们找出 不无聊的电影,并且id 是奇数的,降序排列. 比较直接简单的,具体看code. Java Solution: Runtime: 149 ...
- [LeetCode] 620. Not Boring Movies_Easy tag: SQL
X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a ...
- 620. Not Boring Movies
X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a ...
- [Swift]LeetCode620. 有趣的电影 | Not Boring Movies
SQL架构 Create table If Not Exists cinema (id ), description varchar(), rating , )) Truncate table cin ...
- All LeetCode Questions List 题目汇总
All LeetCode Questions List(Part of Answers, still updating) 题目汇总及部分答案(持续更新中) Leetcode problems clas ...
- Leetcode中的SQL题目练习(一)
595. Big Countries https://leetcode.com/problems/big-countries/description/ Description name contine ...
- [LeetCode] All questions numbers conclusion 所有题目题号
Note: 后面数字n表明刷的第n + 1遍, 如果题目有**, 表明有待总结 Conclusion questions: [LeetCode] questions conclustion_BFS, ...
随机推荐
- reduceByKeyLocally
2017年3月15日, 星期三 reduceByKeyLocally--Transformation类算子 代码示例
- Linux 中出现的-bash: syntax error near unexpected token `
版权声明:本文为博主原创文章,未经博主允许不得转载. 在Linux 5中导入数据时,出现下面的错误. -bash: syntax error near unexpected token `(' 检查了 ...
- thinkphp操作完提示信息该怎么弄成弹出层啊?
http://www.thinkphp.cn/topic/21929.html 浏览:11879 发布日期:2014/08/22 分类:求助交流 关键字: thinkphp success跳转 弹出层 ...
- JavaSE笔记-泛型
定义带泛型的类 public class Cat<T> { //可以用T定义实例变量 private T name; //可以用T定义形参 //构造器没有<> public C ...
- Asp.net mvc 中Action 方法的执行(一)
[toc] 在 Aps.net mvc 应用中对请求的处理最终都是转换为对某个 Controller 中的某个 Action 方法的调用,因此,要对一个请求进行处理,第一步,需要根据请求解析出对应的 ...
- Oracle问题之literal does not match format string
问题: oerr ora 186101861, 00000, "literal does not match format string"// *Cause: Literals i ...
- uwsgi wsgi nginx centos7.2部署flask
请原谅我比较懒,直接粘贴onenote笔记了 方法一测试完成后,建议用方法三:uwsgi,ginx部署
- Linuxc - 操作系统内存分配
静态变量是存储在数据段的,在函数中可以共用. 全局变量也是存储在数据段的,在全局中可以共用. 指针变量本质上是地址,数组变量本质上也是地址. 数组是可靠的,不可变的地址.指针变量是不可靠的,可变的.数 ...
- linux ubuntu 远程ssh登录
当我们有一个Linux系统的时候,可能用到远程ssh登录,当你是没有界面的系统的时候也会用到,远程操作起来比较方便. 首先我们的电脑默认是不安装ssh的,就是无法通过ssh远程连接,所以要安装shh. ...
- Intellij-@Override报错
1.设置 File >> Project Structure >> Project 中设置Project language level如下: 2. 设置 File > ...