Challenge: Regional Discount Flag
Opgave
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
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 3
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Fantastisk!
Completion rate forbedret til 4.17
Challenge: Regional Discount Flag
Stryg for at vise menuen
Opgave
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
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 3
single