Challenge: Apply Business Logic with CASE WHEN
Task
Swipe to start coding
Use CASE WHEN statements to apply business logic for labeling orders and categorizing products.
- For orders, assign a label of 'High' to each order where
total_amountis greater than or equal to 500. Assign a label of 'Standard' to all other orders. - For products, assign a label of 'Tech' to each product that belongs to the 'Electronics' category. Assign a label of 'Other' to all other products.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 5.56
Challenge: Apply Business Logic with CASE WHEN
Swipe to show menu
Task
Swipe to start coding
Use CASE WHEN statements to apply business logic for labeling orders and categorizing products.
- For orders, assign a label of 'High' to each order where
total_amountis greater than or equal to 500. Assign a label of 'Standard' to all other orders. - For products, assign a label of 'Tech' to each product that belongs to the 'Electronics' category. Assign a label of 'Other' to all other products.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2
single