Challenge: Regional Discount Flag
Uppgift
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 allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 3
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Fantastiskt!
Completion betyg förbättrat till 4.17
Challenge: Regional Discount Flag
Svep för att visa menyn
Uppgift
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 allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 3
single