Basic Test

  1. List all of the tables in the sales schema.
  2. When did the sales occur? (Start and end date?)
  3. How many records are there in sales.salesorderheader?
  4. How many orders have occured?
  5. Are there online orders?
  6. If so, how many online or offline orders were made and how much (subtotal)
  7. What is the average subtotal per online transaction?
  8. What is the average subtotal per offline transaction?
  9. Do any of the columns in sales.salesorderheader sum to equal “totaldue”?
  10. Do any of the items sold have a discount applied?
  11. What is APT, and UPT, APU?
    • average per transaction
    • units per transaction
    • average per unit
  12. What join keys are there be in each table in the sales schema?
  13. How many sales occurred in the entire dataset?
  14. How many sales occurred in each territoryid?
  15. How many sales occurred in each Country?
  16. How many sales occurred in each Continent?
  17. What is the subtotal for each Continent?
  18. What is the average number of orders and average subtotal, across all countries?
  19. How many records are there in sales.salesorderheader & sales.salesorderdetail?
  20. How many different salesorderid (in each of sales.salesorderheader & sales.salesorderdetail)?
  21. Does every record in salesorderheader have a match in salesorderdetail when joining on salesorderid?
  22. Create a table which has EVERY combination of customerid (from sales.salesorderheader) and productid (from sales.salesorderdetail).
  23. How many records are there in the resulting table?
  24. Create a table which has EVERY combination of customerid (from sales.salesorderheader) and productid (from sales.salesorderdetail) reasontype (from sales.salesreason).
  25. How many records are there in the resulting table?
  26. Remove both of the tables you created.
  27. How many records are there in sales.customer where personid isn’t null and storeid is null?
  28. How many customers are in each territory where personid isn’t null and storeid is null?
  29. How many different products are there in the sales data?
  30. Were all products sold in all territories?
  31. Using the sales.salesterritory table what is the sum of “salesytd” for US and CA?
  32. How many territoryid’s have “salesytd” over 3 million and less than 9 million?
  33. List all of the territoryid’s that have “salesytd” over 1 million and less than 3 million or their name is Australia.
Request Solutions for the Basic Test