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.
Este ejercicio forma parte del curso
Reporting in SQL
Instrucciones del ejercicio
- Create a report that shows unique
eventsbysportfor both summer and winter events. - Use a
UNIONto combine the relevant tables. - Use two
GROUP BYstatements as needed. - Order the final query to show the highest number of events first.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
-- Select sport and events for summer sports
SELECT
____,
____(____ ____) AS events
FROM ____
____
UNION
-- Select sport and events for winter sports
SELECT
____,
____
FROM ____
____
-- Show the most events at the top of the report
____;