Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
modul:m290:learningunits:lu04:aufgaben:a02 [2024/09/03 13:43] vdemirmodul:m290:learningunits:lu04:aufgaben:a02 [2024/10/17 12:35] (aktuell) vdemir
Zeile 1: Zeile 1:
-====== LU04.A02 - SQL-DQL: Select from multiple tables======+====== LU06.A02 - SQL-DQL: Select from multiple tables======
  
 ===== Requirements  ===== ===== Requirements  =====
   * Work type: individual   * Work type: individual
-  * Timeframe: 20 Minutes+  * Timeframe: 30 Minutes
   * 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://www.w3schools.com/sql/trysql.asp?filename=trysql_select_columns | W3Schools | SQL Editor]]       * [[https://www.w3schools.com/sql/trysql.asp?filename=trysql_select_columns | W3Schools | SQL Editor]]
   * 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 by SupplierName descending+  * Price 
 +The list must be be sorted by the suppliername in descending order.
  
-  SELECT s.SupplierName, s.SupplierID, s.phone,  p.ProductID, p.ProductName, p.Unit, p.Price 
-  FROM Suppliers s, Products p 
-  WHERE p.SupplierID = s.SupplierID 
-  ORDER BY s.SupplierName DESC; 
  
-{{:modul:m290:learningunits:lu04:aufgaben:screenshot_2024-09-03_133944.png?600|}}+==== 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 "Hanari Carnes" has ordered in the past. Sort the list by the quantity. detail we require the following data: 
 +  * CustomerID
 +  * CustomerName
 +  * OrderID
 +  * OrderDate
 +  * Quantity
 +  * ProductName
 +  * CategoryName 
  
-  * b) Extend the select, so that the list contains only have the producs of the supplier "Karrki OY" on our list.  
-  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, s.SupplierID, s.phone,  p.ProductID, p.ProductName, p.Unit, p.Price 
-  FROM Suppliers s, Products p 
-  WHERE p.SupplierID = s.SupplierID 
-  AND s.SupplierID = 20; 
- 
-{{:modul:m290:learningunits:lu04:aufgaben:screenshot_2024-09-03_134335.png?600|}} 
-   
 ===== Solution ===== ===== Solution =====
 [[modul:m290:learningunits:lu04:loesungen:l02|Lösung]] [[modul:m290:learningunits:lu04:loesungen:l02|Lösung]]
- +  
 ===== Vocabulary ===== ===== Vocabulary =====
 ^ English ^ German ^  ^ English ^ German ^ 
-respectively beziehungsweise| +... ...|
-| assignment | Auftrag |+
  
  
 ---- ----
 [[https://creativecommons.org/licenses/by-nc-sa/4.0/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]] Volkan Demir [[https://creativecommons.org/licenses/by-nc-sa/4.0/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]] Volkan Demir
  • modul/m290/learningunits/lu04/aufgaben/a02.1725363833.txt.gz
  • Zuletzt geändert: 2024/09/03 13:43
  • von vdemir