Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Release Year Priority | Conditional Filtering and Sorting with CASE WHEN
Practice
Projects
Quizzes & Challenges
Questionários
Challenges
/
Mastering CASE WHEN in SQL

bookChallenge: Release Year Priority

Tarefa

Swipe to start coding

Write a query to retrieve all columns from the movies table and order the results so that movies with genre 'Sci-Fi' released after 2010 appear first. All other movies should follow, ordered by release_year in descending order.

  • Use a CASE WHEN statement in the ORDER BY clause to assign the highest priority to movies where genre is 'Sci-Fi' and release_year is greater than 2010.
  • Order the remaining movies by release_year in descending order.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 6
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Release Year Priority

Deslize para mostrar o menu

Tarefa

Swipe to start coding

Write a query to retrieve all columns from the movies table and order the results so that movies with genre 'Sci-Fi' released after 2010 appear first. All other movies should follow, ordered by release_year in descending order.

  • Use a CASE WHEN statement in the ORDER BY clause to assign the highest priority to movies where genre is 'Sci-Fi' and release_year is greater than 2010.
  • Order the remaining movies by release_year in descending order.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 6
single

single

some-alt