Dies ist eine alte Version des Dokuments!
LU04.A02 - SQL-DQL: Select from multiple tables
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
Assignments
You general assignment is to develop DQL commands that matches the requirements below:
- a) We need a list with product details as following:
- Supplier name
- Supplier phone
- ProductID
- ProductName
- Units
- Price
- Ordered by SupplierName descending
SELECT s.SupplierName, s.Phone, p.ProductID, p.ProductName, p.Units, p.Price, FROM Suppliers s, Product p WHERE s.SupplierID = p.SupplierID; * b) Generate a list with ProductNames, Price and SupplierIDs within a price range of 20 and 45, sorted the Price and SupplierID, both ascending. * c) Find all employees who graduated from a university. The relevant information is hidden in the table Employees, within the colums Notes.