Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Price Tier Assignment | CASE WHEN Basics and Categorization
Mastering CASE WHEN in SQL

bookChallenge: Price Tier Assignment

Uppgift

Swipe to start coding

Assign a price tier label to each sale using the price value in the sales table. Add a new column called price_tier to the result set with the following logic:

  • If the price is greater than 700, assign the value 'Premium'.
  • If the price is between 300 and 700 inclusive, assign the value 'Standard'.
  • Otherwise, assign the value 'Budget'.

Lösning

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

close

bookChallenge: Price Tier Assignment

Svep för att visa menyn

Uppgift

Swipe to start coding

Assign a price tier label to each sale using the price value in the sales table. Add a new column called price_tier to the result set with the following logic:

  • If the price is greater than 700, assign the value 'Premium'.
  • If the price is between 300 and 700 inclusive, assign the value 'Standard'.
  • Otherwise, assign the value 'Budget'.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

some-alt