In this workshop you'll learn how to consult, filter, aggregate, join, order and project data coming from the relational database called Planten 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 Planten.
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 Planten 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.
The exercises are just a link to the exercises of last year's databases 1 course.
Please note that in Databases 1 we used MySQL instead of Microsoft SQL Server. There can be subtly differences in the syntax.
| Exercise | Subject |
|---|---|
| 01 - Consult | Select, Where, Order By |
| 02 - Aggregate | Statistical Functions |
| 03 - Join | Join |
| 04 - Manipulate | C |
| 05 - Define | DDL |
