Seksjon 3. Kapittel 3
single
Challenge: Blockbuster Filter
Sveip for å vise menyen
Oppgave
Sveip for å begynne å kode
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, andbox_officefrom themoviestable. - Add a column using a
CASE WHENexpression to label each movie as'Blockbuster'or'Standard'based on the criteria above. - Name the new column
blockbuster_status.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 3
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår