Challenge: Regional Discount Flag
Oppgave
Swipe to start coding
Write a query that adds a column discount_eligible to the sales table output. The value should be 'Yes' if the region is 'East' or 'West', and 'No' otherwise.
- Add a column named
discount_eligibleusing aCASE WHENstatement. - Return
'Yes'indiscount_eligibleif theregionis'East'or'West'. - Return
'No'indiscount_eligiblefor all other regions.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. 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
Fantastisk!
Completion rate forbedret til 4.17
Challenge: Regional Discount Flag
Sveip for å vise menyen
Oppgave
Swipe to start coding
Write a query that adds a column discount_eligible to the sales table output. The value should be 'Yes' if the region is 'East' or 'West', and 'No' otherwise.
- Add a column named
discount_eligibleusing aCASE WHENstatement. - Return
'Yes'indiscount_eligibleif theregionis'East'or'West'. - Return
'No'indiscount_eligiblefor all other regions.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 3
single