Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Release Year Priority | Conditional Filtering and Sorting with CASE WHEN
Mastering CASE WHEN in SQL

bookChallenge: Release Year Priority

Compito

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.

Soluzione

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 3. Capitolo 6
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

close

bookChallenge: Release Year Priority

Scorri per mostrare il menu

Compito

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.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 3. Capitolo 6
single

single

some-alt