Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
modul:m290:learningunits:lu04:aufgaben:a02 [2024/09/03 13:43] – vdemir | modul:m290:learningunits:lu04:aufgaben:a02 [2024/10/17 12:35] (aktuell) – vdemir | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== | + | ====== |
===== Requirements | ===== Requirements | ||
* Work type: individual | * Work type: individual | ||
- | * Timeframe: | + | * Timeframe: |
* Means of aid: | * Means of aid: | ||
* only teaching materials, no websearch, no use of ai. | * only teaching materials, no websearch, no use of ai. | ||
* [[https:// | * [[https:// | ||
* Expected result: Semantically and syntactically correct SQL statements according to the requirements of the case studies. | * Expected result: Semantically and syntactically correct SQL statements according to the requirements of the case studies. | ||
- | * | ||
===== Case studies / Assignments ===== | ===== Case studies / Assignments ===== | ||
Zeile 16: | Zeile 15: | ||
===== Assignments ===== | ===== Assignments ===== | ||
- | You general assignment is to develop DQL commands that matches the requirements below: | + | The general assignment is to develop DQL commands that matches the requirements below: |
- | * a) We need a list with product details as following: | + | ==== Assignment A ==== |
- | * Supplier name | + | We need a list with product details as following: |
- | * Supplier phone | + | * Name of the supplier |
- | * ProductID | + | * Supplier phone |
- | * ProductName | + | * Product ID |
- | * Units | + | * Name of the product |
- | * Price | + | * Units |
- | * Ordered | + | * Price |
+ | The list must be be sorted | ||
- | SELECT s.SupplierName, | ||
- | FROM Suppliers s, Products p | ||
- | WHERE p.SupplierID = s.SupplierID | ||
- | ORDER BY s.SupplierName DESC; | ||
- | {{: | + | ==== Assignment B ==== |
+ | Extend the the result of the Select statement from assignment a), so that it must contain only produtcs of the supplier "Leka Trading" | ||
+ | ==== Assignment C ==== | ||
+ | We would like to know what products the customer " | ||
+ | * CustomerID | ||
+ | * CustomerName | ||
+ | * OrderID | ||
+ | * OrderDate | ||
+ | * Quantity | ||
+ | * ProductName | ||
+ | * CategoryName | ||
- | * b) Extend the select, so that the list contains only have the producs of the supplier " | ||
- | There are two possible solutions. The first one is to to search for the ID (SupplierID = 20)of the supplier and take that ID into our SELECT as follows: | ||
- | |||
- | SELECT s.SupplierName, | ||
- | FROM Suppliers s, Products p | ||
- | WHERE p.SupplierID = s.SupplierID | ||
- | AND s.SupplierID = 20; | ||
- | |||
- | {{: | ||
- | | ||
===== Solution ===== | ===== Solution ===== | ||
[[modul: | [[modul: | ||
- | + | | |
===== Vocabulary ===== | ===== Vocabulary ===== | ||
^ English ^ German ^ | ^ English ^ German ^ | ||
- | | respectively | + | | ... | ...| |
- | | assignment | Auftrag | + | |
---- | ---- | ||
[[https:// | [[https:// |