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

bookChallenge: Release Year Priority

Tehtävä

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.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 6
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

bookChallenge: Release Year Priority

Pyyhkäise näyttääksesi valikon

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 6
single

single

some-alt