Quick
Ref.
| The Derived Table (SELECT FROM SELECT)List the largest country for each region Sometimes you need to use the results from one query in another. To show the largest country (by population) for each region you can join the list of countries to the list of regions (with max populations). For example you can get the maximum population for each region using:
What about ties?If one region has two countries with the same, highest population then the query will produce the right answers but there will be duplication- both countries will be shown. See also: |