On January 21th at 14:15 UTC , progression through exercises will be unavailable for 10 minutes due to a planned maintenance break.
Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Custom classifications of business objects
5. Fallback values
Custom grouping of business objects
Custom counting of business objects


So, orders shipped outside the USA and Canada had NULL shipping_cost values. This is because we didn't specify the column value for other countries.

Northwinds' shipping cost for countries other than the US and Canada is $10.00. How can we show that in the report? Take a look:

    WHEN ship_country = 'USA' OR ship_country = 'Canada' THEN 0.0
    ELSE 10.0
  END AS shipping_cost
FROM orders
WHERE order_id BETWEEN 10720 AND 10730;

We enriched our CASE WHEN construction with an ELSE. The ELSE is executed when no other conditions are satisfied. Thanks to this, all other countries will get a column value of 10.0 instead of NULL.


We want to show the following basic customer information (from the customers table):

  1. customer_id
  2. company_name
  3. country
  4. language

The value of the language column will be decided by the following rules:

  • 'German' for companies from Germany, Switzerland, and Austria.
  • 'English' for companies from the UK, Canada, the USA, and Ireland.
  • 'Other' for all other countries.

Stuck? Here's a hint!

Use the following template in the SELECT clause:

  WHEN country IN (...) THEN 'German'
  WHEN country IN (...) THEN 'English'
  ELSE 'Other'