Playing With SQL

Playing With SQL

Please use the attached file to download the database needed to answer the following questions, run the scripts in MySQL, and remember, when running this sql file, it’ll need mysql to be out of safe mode

  1. What employees have last names that begin with “D”?
  2. What customers have marketing in their title?
  3. How many territories are there?
  4. How many territories are there in each region?
  5. What suppliers are from the USA?
  6. What’s the average unit price of products?
  7. What’s the average unit price for and count of products that are out of stock? (stock = 0, not counting things ordered.)
  8. Which employees have ‘BA’s?
  9. What are the top 10 orders according to quantity?
  10. How many regions do each employee work?
  11. What were the top 10 orders according to final cost? (quantity x unit cost)

12: What was the average time from order to shipping for each employee? (shipping Date – order date)