Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Categorize Sales Volume | CASE WHEN Basics and Categorization
Practice
Projects
Quizzes & Challenges
Вікторини
Challenges
/
Mastering CASE WHEN in SQL

bookChallenge: Categorize Sales Volume

Завдання

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'.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 2
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: Categorize Sales Volume

Свайпніть щоб показати меню

Завдання

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'.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 2
single

single

some-alt