Dies ist eine alte Version des Dokuments!
LU04.A04 - SQL-DQL: Selects with Aggregate Functions
Requirements
- Work type: individual
- Timeframe: 20 Minutes
- Means of aid:
- only teaching materials, no websearch, no use of ai.
- Expected result: Semantically and syntactically correct SQL statements according to the requirements of the case studies.
Case studies / Assignments
The following ERD describes a order database for a a shop.
Assignments
The general assignment is to develop DQL commands that matches the requirements below:
Assignment a: MIN
We want to know which of our products is actually the most expensive.
SELECT max(price) FROM Products;
Assignment b: MAX
What is the lowest price among the products of the supplier with the id = 12.
SELECT max(price) FROM Products WHERE SupplierID = 12;
====
Assignment c)
…