Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Custom classifications of business objects
Custom grouping of business objects
8. Custom grouping – exercise
Custom counting of business objects


Good. Let's do one more exercise of this kind.


We want to create a simple report that will show the number of young and old employees at Northwind. Show two columns: age and employee_count.

The age column has the following values:

  • 'young' for people born after Jan. 1, 1980.
  • 'old' for all other employees.

Stuck? Here's a hint!

Use the following condition:

birth_date > '1980-01-01'

Here's an example of using CASE WHEN:

  WHEN country IN ('USA', 'Canada') THEN 'North America'
  WHEN country IN ('Japan', 'Singapore') THEN 'Asia'
  ELSE 'Other'
END AS supplier_continent