In this workshop you'll learn how to consult, filter, aggregate, join, order and project data coming from the relational database called Tennis by using the following statements:
SELECTDISTINCTWHEREORDER BYGROUP BY[INNER|LEFT|OUTER] JOIN
- SQL Server 2017+ Installed;
- SQL Server Management Studio Installed;
- A running copy of the database Tennis.
You can download the database by using this link, information on how to restore a database can be found here.
Below you'll find multiple exercises, for each exercise do the following:
- Investigate the database schema of the Tennis database;
- Figure out which:
- table(s) you will be consulting;
- columns you will be projecting;
- filters that are needed;
- aggregations that are mandatory;
- sort order is necessary.
- Write the query;
- Check your results.
- In which towns do more than 5 players live, provide the name of the town and the amount of players who live there.
- Give the name and total penalty amount for each player that already has a total of more than or equal to 150 euro in penalties.
If you need more exercises please check the Planten exercises.
A possible solution for these exercises can be found here.
