, amt, cnum. ( 15):
SELECT *
FROM Orders
ORDER BY cnum DESC, amt DESC;
15
ORDER BY . , , SELECT. , , :
SELECT cname, city
FROM Customers
ORDER BY cnum;
cnum , ORDER BY . , , ( SELECT) , ORDER BY, .
ORDER BY GROUP BY . ORDER BY . , , , , :
SELECT snum, odate, MAX (amt)
FROM Orders
GROUP BY snum, odate
ORDER BY snum;
16
, .
NULL
(NULL) , .
SQL - , . - , . , , . , FROM , . , , . , , WHERE .
, . :
- Salespeople.snum
- Salespeople.city
- Orders.odate
, , , SQL , , . , , . . , city.
|
|
(), Salespeople.city Customers.city, SQL .
, , . . , ( 17):
SELECT Customers.cname, Salespeople.sname, Salespeople.city
FROM Salespeople, Customers
WHERE Salespeople.city = Customers.city;
17
city , . , . , , , , , , .
SQL - , . , Peel , . , city London, Peel - . ( ).