Skip to content

Latest commit

 

History

History
43 lines (37 loc) · 2.28 KB

File metadata and controls

43 lines (37 loc) · 2.28 KB

Workshop - Revisit the basics : Planten

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:

  • SELECT
  • DISTINCT
  • WHERE
  • ORDER BY
  • GROUP BY
  • [INNER|LEFT|OUTER] JOIN

Prerequisites

  • 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.

Getting started

Below you'll find multiple exercises, for each exercise do the following:

  1. Investigate the database schema of the Planten database;
  2. 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.
  3. Write the query;
  4. Check your results.

Database schema - Planten

img

Exercises

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 CRUD
05 - Define DDL