Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Custom Movie Ranking | Conditional Filtering and Sorting with CASE WHEN
Mastering CASE WHEN in SQL
セクション 3.  5
single

single

bookChallenge: Custom Movie Ranking

メニューを表示するにはスワイプしてください

タスク

スワイプしてコーディングを開始

Write a query that ranks movies using a custom rule. 'Action' movies with a box_office greater than or equal to 50000000 should come first. All other movies should follow, ordered by rating in descending order.

  • Select all columns from the movies table.
  • Use CASE WHEN in the ORDER BY clause to ensure 'Action' movies with box_office >= 50000000 appear first.
  • For movies not meeting the above condition, order them by rating in descending order.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 3.  5
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt