Challenge: Categorize Sales Volume
Oppgave
Swipe to start coding
Write a query that selects all columns from the sales table and adds a new column named volume_category. The value of volume_category should be determined by the following rules:
- If
quantityis greater than or equal to 100, setvolume_categoryto'Bulk'. - If
quantityis greater than or equal to 20 but less than 100, setvolume_categoryto'Standard'. - If
quantityis less than 20, setvolume_categoryto'Small'.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 2
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Fantastisk!
Completion rate forbedret til 4.17
Challenge: Categorize Sales Volume
Sveip for å vise menyen
Oppgave
Swipe to start coding
Write a query that selects all columns from the sales table and adds a new column named volume_category. The value of volume_category should be determined by the following rules:
- If
quantityis greater than or equal to 100, setvolume_categoryto'Bulk'. - If
quantityis greater than or equal to 20 but less than 100, setvolume_categoryto'Standard'. - If
quantityis less than 20, setvolume_categoryto'Small'.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 2
single