Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Categorize Sales Volume | CASE WHEN Basics and Categorization
Practice
Projects
Quizzes & Challenges
Quizzen
Challenges
/
Mastering CASE WHEN in SQL

bookChallenge: Categorize Sales Volume

Taak

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 quantity is greater than or equal to 100, set volume_category to 'Bulk'.
  • If quantity is greater than or equal to 20 but less than 100, set volume_category to 'Standard'.
  • If quantity is less than 20, set volume_category to 'Small'.

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 2
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

bookChallenge: Categorize Sales Volume

Veeg om het menu te tonen

Taak

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 quantity is greater than or equal to 100, set volume_category to 'Bulk'.
  • If quantity is greater than or equal to 20 but less than 100, set volume_category to 'Standard'.
  • If quantity is less than 20, set volume_category to 'Small'.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 2
single

single

some-alt