December 13, 2009

SQL(II)的練習

1.SELECT SUM(UnitPrice*Quantity) AS 訂貨總價
FROM OrderDetails
WHERE OrderID IN
(SELECT OrderID
FROM Orders
WHERE EmployeeID IN (3));
2.SELECT EmployeeID AS 員工編號
FROM Employees
WHERE BirthDate IN
(SELECT min(BirthDate)
FROM Employees);
3.SELECT SUM(UnitPrice*Quantity) AS 訂貨總價
FROM OrderDetails
WHERE OrderID IN
(SELECT OrderID
FROM Orders
WHERE EmployeeID IN
(SELECT EmployeeID
FROM Employees
WHERE BirthDate IN
(SELECT min(BirthDate)
FROM Employees)));

由 b202097029 發表於 December 13, 2009 08:08 PM
迴響
發表迴響









記住我的資訊?





請依上圖輸入檢核碼: