MySQL3_OrdEntry (2).sql - MySQL3_OrdEntry.sql Problem_01...

This preview shows page 1 - 2 out of 2 pages.

/* MySQL3_OrdEntry.sql */-- Problem_01: List all columns of the Product table for -- products costing more than $50. Order the result by -- product manufacturer (ProdMfg) and product names.SELECT * FROM ProductWHERE ProdPrice > 50ORDER BY ProdMfg, ProdName-- Problem_02: List the customer number, the name (first -- and last), the city, and the balance of customers who -- reside in Denver with a balance greater than $150 or who -- reside in Seattle with balance greater than $300.SELECT CustNo, CustFirstName, CustLastName, CustCity, CustBal FROM CustomerWHERE (CustCity = 'Denver' AND CustBal > 150)OR (CustCity = 'Seattle' AND CustBal > 300) -- Problem_03: List the cities and states where orders have -- been placed. Remove duplicates from the result.SELECT DISTINCT OrdCity, OrdStateFROM OrderTbl-- Problem_04: List the columns of the OrderTbl table for -- phone orders placed in January 2030. A phone order has -- an associated employee.SELECT * FROM OrderTblWHERE (OrderDate BETWEEN '2030-1-1' AND '2030-1-31') AND EmpNo IS NOT NULL-- Problem_05: List all columns of Product table that

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture