Ch. 5 — The Many-to-Many Relationship
Ch. 5 Exercises
Exercise 1
List the products that were ordered on a Monday.
Exercise 2
When was the 1940 Ford Pickup Truck ordered? List all order dates.
Exercise 3
List customers and orders where the order total exceeds $25,000.
Exercise 4
Report products that have been sold at less than 80% of MSRP.
Exercise 5
Report products sold at more than twice the buy price.
Exercise 6
List products on hold orders along with their current stock quantity.
ClassicModels Schema
customers
customerNumbercustomerNamecontactLastNamecontactFirstNamephoneaddressLine1addressLine2citystatepostalCodecountrysalesRepEmployeeNumbercreditLimitcustomerLocation 122 rows
employees
employeeNumberlastNamefirstNameextensionemailreportsTojobTitleofficeCode 23 rows
offices
officeCodecityphoneaddressLine1addressLine2statecountrypostalCodeterritoryofficeLocation 7 rows
orderdetails
orderNumberproductCodequantityOrderedpriceEachorderLineNumber 2996 rows
orders
orderNumberorderDaterequiredDateshippedDatestatuscommentscustomerNumber 326 rows
payments
checkNumberpaymentDateamountcustomerNumber 273 rows
productlines
productLinetextDescriptionhtmlDescriptionimage 7 rows
products
productCodeproductNameproductScaleproductVendorproductDescriptionquantityInStockbuyPriceMSRPproductLine 110 rows
Write a query or click an exercise to load it.