Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Advanced Business Logic | CASE WHEN for Business Logic
SQL for Business Intelligence Analysts

bookChallenge: Advanced Business Logic

Tehtävä

Swipe to start coding

Classify each order using both region and total_amount by writing a SQL query with nested and multiple CASE WHEN statements. Follow these rules:

  • If the region is "Europe" and the total_amount is greater than 100, assign the label 'Priority';
  • Otherwise, if the total_amount is greater than 200, assign the label 'High Value';
  • All other orders should be labeled as 'Regular'.

Use a nested CASE WHEN structure to demonstrate your understanding. Return the columns: order_id, region_name, and the label as order_label.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 4
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

bookChallenge: Advanced Business Logic

Pyyhkäise näyttääksesi valikon

Tehtävä

Swipe to start coding

Classify each order using both region and total_amount by writing a SQL query with nested and multiple CASE WHEN statements. Follow these rules:

  • If the region is "Europe" and the total_amount is greater than 100, assign the label 'Priority';
  • Otherwise, if the total_amount is greater than 200, assign the label 'High Value';
  • All other orders should be labeled as 'Regular'.

Use a nested CASE WHEN structure to demonstrate your understanding. Return the columns: order_id, region_name, and the label as order_label.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 4
single

single

some-alt