Session Ready
Exercise

Number of events in each sport

The full E:R diagram for the database is shown below:

Since the company will be involved in both summer sports and winter sports, it is beneficial to look at all sports in one centralized report.

Your task is to create a query that shows the unique number of events held for each sport. Note that since no relationships exist between these two tables, you will need to use a UNION instead of a JOIN.

Instructions
100 XP
  • Create a report that shows unique events by sport for both summer and winter events.
  • Use a UNION to combine the relevant tables.
  • Use two GROUP BY statements as needed.
  • Order the final query to show the highest number of events first.