Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Written in SQL /* 6. Create a list of all the products (prod_id and name) if all the following are true (7 records) Supplierid =

image text in transcribed

Written in SQL

/* 6. Create a list of all the products (prod_id and name) if all the following are true (7 records) Supplierid = 2, 5, 16, 8, or 9 Categoryid = 1, 2, or 4 Unitprice > 15.00 */

/* 7. Create a list of all the products (prod_id and name) if all the following are true (11 records)

Supplierid = 2, 5, 16, 8, or 9 AND Categoryid = 1, 2, or 4 AND Unitprice > 15.00 OR Supplierid = 1, 4, 8 AND categoryid= 3 or 4 */

/* 8. Create a list of product names that have the second letter of the name = h (8 records) */

/* 9. Create a list of product names that have the second letter of the name = a and the last letter = e (2 records) */

/* 10. List all the customers that have one of the following fields NULL (Region or Fax). Also the title of the contact should be Owner Sort the list by contact name (14 records) */

/* 11. List each employees name (first and last in one column) and their birthdate. Sort the list by birthdate. */

/* 12. Which employees were born in 1963? */

/* 13. How many employees does Northwind have? */

/*14. For each customer (customer id) list the date of the first order they placed and the date of the last order they placed. */

/* 15. Using question 14, only list customers where there last order was in 2011. Sort the list by customer. */

/* 16. Which employees were born in the month of July? */

/* 17. How many orders has Northwind taken? (Answer 830) */

/* 18. How many orders were placed per year? */

/* 19. How many orders by month for each year? Make sure the list is in order by year and month? */

/* 20. Using question 19, list only the months where Northwind have less than 25 orders. (3 records) */

/* 21. For each order detail, list the ordered, productid, and the total sale price */

Suppliers * SupplierID Company Name Contact Name ContactTitle Address City Region PostalCode Country Phone Fax HomePage Products ProductID ProductName SupplierID CategoryID QuantityPerUnit Unit Price UnitsInStock Units OnOrder ReorderLevel Discontinued Order Details OrderID * ProductID UnitPrice Quantity Discount Orders OrderID CustomerID EmployeeID OrderDate RequiredDate ShippedDate Ship Via Freight Ship Name ShipAddress Ship City Ship Region ShipPostalCode Ship Country Customers * CustomerID CompanyName ContactName ContactTitle Address City Region PostalCode Country Phone Fax Categories CategoryID CategoryName Description Picture Shippers * ShipperID CompanyName Phone Employees EmployeeID LastName FirstName Title TitleOfCourtesy BirthDate HireDate Address City Region PostalCode Country Home Phone Extension Photo Notes ReportsTo

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions