Challenge: Custom Movie Ranking
Tarefa
Swipe to start coding
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
moviestable. - Use
CASE WHENin theORDER BYclause to ensure 'Action' movies withbox_office>= 50000000 appear first. - For movies not meeting the above condition, order them by
ratingin descending order.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 5
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 4.17
Challenge: Custom Movie Ranking
Deslize para mostrar o menu
Tarefa
Swipe to start coding
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
moviestable. - Use
CASE WHENin theORDER BYclause to ensure 'Action' movies withbox_office>= 50000000 appear first. - For movies not meeting the above condition, order them by
ratingin descending order.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 5
single