Challenge: Sales Performance Label
Tarea
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'.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 6
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Genial!
Completion tasa mejorada a 4.17
Challenge: Sales Performance Label
Desliza para mostrar el menú
Tarea
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'.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 6
single