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

bookChallenge: Regional Discount Flag

Завдання

Swipe to start coding

Write a query that adds a column discount_eligible to the sales table output. The value should be 'Yes' if the region is 'East' or 'West', and 'No' otherwise.

  • Add a column named discount_eligible using a CASE WHEN statement.
  • Return 'Yes' in discount_eligible if the region is 'East' or 'West'.
  • Return 'No' in discount_eligible for all other regions.

Рішення

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

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

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

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

single

Запитати АІ

expand

Запитати АІ

ChatGPT

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

close

bookChallenge: Regional Discount Flag

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

Завдання

Swipe to start coding

Write a query that adds a column discount_eligible to the sales table output. The value should be 'Yes' if the region is 'East' or 'West', and 'No' otherwise.

  • Add a column named discount_eligible using a CASE WHEN statement.
  • Return 'Yes' in discount_eligible if the region is 'East' or 'West'.
  • Return 'No' in discount_eligible for all other regions.

Рішення

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

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

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

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

single

some-alt