180612_SELECT certain ITEM

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
id movie description rating
5 House card Interesting 9.1
1 War great 3D 8.9

For the example above, the output should be:

id movie description rating
5 House card Interesting 9.1
1 War great 3D 8.9
SELECT c1.*
FROM cinema as c1
WHERE c1.id mod 2 <> 0
AND c1.description <> "boring"
ORDER BY c1.rating DESC
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,486评论 0 10
  • 昨天听闻公司亚洲区人力总监的丈夫因为心肌梗塞突然离世,年仅47岁。以前总是看新闻说某某因为什么过世,不发生在身边没...
    美好七月阅读 271评论 0 0
  • 他是个特别优秀的人。去年,他问,过年回不回去。 不啊,不回去。第二年。她想方设法的回去了。 柔柔∶ 每天都会在努力...
    路路66阅读 445评论 0 1
  • 我,三娴,一个不称职的道士。 从今天开始,不定期的进行自我忏悔。 为什么说自己是不称职的道士呢,因为作为一名道士,...
    三娴儿阅读 759评论 0 0