Dies ist eine alte Version des Dokuments!
LU04.A01 - SQL : DQL commands
Requirements
- Work type: individual
- Means of aid:
- only teaching materials, no websearch, no use of ai.
- Timeframe: 1 Minutes
- Expected result: Sementically and syntactically SQL statements according to the requirements of the case studies. The resultset match the specified template.
Case studies / Asignments
Go to the W3-Schools SQL Editore and develop DQL commands to the following requirements
Assignment a)
Create a adress-list of the customers with the columns in this order: CustomerName, Adress, PostalCode, Country, ordered by the the Country ascending.
Select CustomerName, Address, PostalCode, Country from customers order by country;
Assignment b)
Generate a list with ProductNames, Price and SupplierIDs within a price range of 20 and 45, sorted the Price and SupplierID, both ascending.
SELECT Price, Productname, Supplierid FROM Products WHERE Price BETWEEN 20 AND 45 ORDER BY Price ASC, SupplierID ASC;
Assignment c)
Find all employees who graduated from a university. The relevant information is hidden in the table Employees, within the colums Notes.
SELECT * FROM Employees WHERE Notes LIKE "%grad%";