Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Blockbuster Filter | Conditional Filtering and Sorting with CASE WHEN
Mastering CASE WHEN in SQL
Sectie 3. Hoofdstuk 3
single

single

Challenge: Blockbuster Filter

Veeg om het menu te tonen

Taak

Veeg om te beginnen met coderen

Write a query that selects the title, genre, rating, and box_office columns from the movies table. Use a CASE WHEN expression to add a column that labels each movie as 'Blockbuster' if its box_office is greater than or equal to 100,000,000 or its rating is greater than or equal to 8.5. Otherwise, label it as 'Standard'.

  • Select the columns title, genre, rating, and box_office from the movies table.
  • Add a column using a CASE WHEN expression to label each movie as 'Blockbuster' or 'Standard' based on the criteria above.
  • Name the new column blockbuster_status.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 3. Hoofdstuk 3
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

some-alt