|
1 |
| ---620. Not Boring Movies |
2 |
| ---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. |
3 |
| ---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. |
4 |
| --- |
5 |
| --- |
6 |
| --- |
7 |
| ---For example, table cinema: |
8 |
| --- |
9 |
| ---+---------+-----------+--------------+-----------+ |
10 |
| ---| id | movie | description | rating | |
11 |
| ---+---------+-----------+--------------+-----------+ |
12 |
| ---| 1 | War | great 3D | 8.9 | |
13 |
| ---| 2 | Science | fiction | 8.5 | |
14 |
| ---| 3 | irish | boring | 6.2 | |
15 |
| ---| 4 | Ice song | Fantacy | 8.6 | |
16 |
| ---| 5 | House card| Interesting| 9.1 | |
17 |
| ---+---------+-----------+--------------+-----------+ |
18 |
| ---For the example above, the output should be: |
19 |
| ---+---------+-----------+--------------+-----------+ |
20 |
| ---| id | movie | description | rating | |
21 |
| ---+---------+-----------+--------------+-----------+ |
22 |
| ---| 5 | House card| Interesting| 9.1 | |
23 |
| ---| 1 | War | great 3D | 8.9 | |
24 |
| ---+---------+-----------+--------------+-----------+ |
25 |
| - |
26 | 1 | select id, movie, description, rating
|
27 | 2 | from cinema where mod (id, 2) = 1
|
28 | 3 | and description not like 'boring'
|
|
0 commit comments