Chapter 4 and 9

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

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

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/22/2009 for the course DBST DBST 651 taught by Professor Yelena - ta during the Spring '09 term at MD University College.

### 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
Ask a homework question - tutors are online