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

bookChallenge: Release Year Priority

Tarea

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.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 6
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

close

bookChallenge: Release Year Priority

Desliza para mostrar el menú

Tarea

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.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 6
single

single

some-alt