Challenge: Sales Performance Label
Taak
Swipe to start coding
Write a query that adds a performance column to the sales table output, labeling each row based on quantity and price:
- If both
quantityis greater than or equal to 50 andpriceis greater than or equal to 100, label as'Top'. - If only one of these conditions is met, label as
'Average'. - Otherwise, label as
'Low'.
Steps:
- Use a
CASE WHENexpression in theSELECTclause to create theperformancecolumn. - Check if both
quantityis greater than or equal to 50 andpriceis greater than or equal to 100. - Check if only one of those conditions is met.
- Label all other rows as
'Low'.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 6
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Geweldig!
Completion tarief verbeterd naar 4.17
Challenge: Sales Performance Label
Veeg om het menu te tonen
Taak
Swipe to start coding
Write a query that adds a performance column to the sales table output, labeling each row based on quantity and price:
- If both
quantityis greater than or equal to 50 andpriceis greater than or equal to 100, label as'Top'. - If only one of these conditions is met, label as
'Average'. - Otherwise, label as
'Low'.
Steps:
- Use a
CASE WHENexpression in theSELECTclause to create theperformancecolumn. - Check if both
quantityis greater than or equal to 50 andpriceis greater than or equal to 100. - Check if only one of those conditions is met.
- Label all other rows as
'Low'.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 6
single