Exercise

Queries with derived tables (I)

The focus of this lesson is derived tables. You can use derived tables when you want to break down a complex query into smaller steps. A derived table is a query which is used in the place of a table. Derived tables are a great solution if you want to create intermediate calculations that need to be used in a larger query.

In this exercise, you will calculate the maximum value of the blood glucose level for each record by age.

Instructions

100 XP
  • Return MaxGlucose from the derived table.
  • Join the derived table to the main query on Age.