Chapter 4 and 9 - Chapter 4 Problem 1 SELECT CustNo,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 4 Problem 1 SELECT CustNo, CustFirstName, CustLastName, CustBal FROM Customer; Problem 2 SELECT CustNo, CustFirstName, CustLastName, CustBal FROM Customer WHERE CustState=’CO’; Problem 3 SELECT * FROM Product WHERE ProdPrice>50.00 ORDER BY ProdMfg, ProdName; Problem 10 SELECT OrdNo, OrdData, CustNo FROM OrderTbl WHERE OrdDate>’23-Jan-2007’ and OrdState=’WA’; Problem 15 SELECT DISTINCT Employee.EmpNo, EmpFirstName, EmpLastName, EmpPhone FROM (Employee INNER JOIN OrderTbl ON Employee.EmpNo=OrderTbl.EmpNo) INNER JOIN Customer on Customer.CustNo=OrderTbl.CustNo WHERE OrdDate BETWEEN ‘1-Jan-2007’ AND ’31-Jan-2007’ AND CustBal>300.00; Problem 20 SELECT AVG (CustBal) AS AverageBalance, COUNT(CustNo) AS NumCustomers FROM Customer WHERE CustState=’WA’ GROUP BY CustCity HAVING COUNT(CustNo)>=2; Problem 25 SELECT Product.ProdNo, ProdName, SUM (Qty) AS TotalQty, SUM (ProdPrice*Qty) AS Amount FROM (Product INNER JOIN OrdLine ON Product.ProdNo=OrdLine.ProdNo) INNER JOIN OrderTbl on OrderTbl.OrdNo=OrdLine.OrdNo
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Chapter 4 and 9 - Chapter 4 Problem 1 SELECT CustNo,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online