Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Regional Discount Flag | CASE WHEN Basics and Categorization
Mastering CASE WHEN in SQL

bookChallenge: Regional Discount Flag

Aufgabe

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.

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 3
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

bookChallenge: Regional Discount Flag

Swipe um das Menü anzuzeigen

Aufgabe

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 3
single

single

some-alt