IT Learning HubIT Learning Hub
WEEK 3 · PRACTICE EXERCISES

Exercises & Answer Key

IT004BTTH3Sales Management

The exercise statement is open to read freely. The answer key and detailed explanations are reserved for students currently enrolled in the IT004 practicum class and require an access code from the instructor.

EXERCISE

Sales Management - Questions 26 ➜ 53

Following the Week 3 guide, use Microsoft SQL Server to complete Part III - questions 26 through 53. Attempt each one yourself before checking hints/answers. Full question details are in the PDF below.

Submission requirement: Save your work in a single script file named <MSSV>_<HoVaTen>_BTTH3.sql (MSSV is your student ID, HoVaTen is your full name).
  1. Find the invoice numbers that include all products manufactured in Singapore.
  2. Find the invoice numbers in 2006 that include all products manufactured in Singapore.
  3. How many invoices were not purchased by a registered member customer?
  4. How many distinct products were sold in 2006?
  5. What are the highest and lowest invoice totals?
  6. What is the average value of all invoices sold in 2006?
  7. Calculate the sales revenue for 2006.
  8. Find the invoice number with the highest total value in 2006.
  9. Find the full name of the customer who purchased the invoice with the highest total value in 2006.
  10. Print the top 3 customers (MAKH, HOTEN) sorted by sales in descending order.
  11. Print the list of products (MASP, TENSP) priced at one of the 3 highest price levels.
  12. Print the list of products (MASP, TENSP) manufactured in "Thai Lan" priced at one of the 3 highest price levels (among all products).
  13. Print the list of products (MASP, TENSP) manufactured in "Trung Quoc" priced at one of the 3 highest price levels (among products manufactured in "Trung Quoc").
  14. Print the list of customers ranked in the top 3 (ranked by sales).
  15. Calculate the total number of products manufactured in "Trung Quoc".
  16. Calculate the total number of products for each country of manufacture.
  17. For each country of manufacture, find the highest, lowest, and average selling price of its products.
  18. Calculate the daily sales revenue.
  19. Calculate the total quantity sold for each product in October 2006.
  20. Calculate the monthly sales revenue for each month of 2006.
  21. Find invoices that include at least 4 different products.
  22. Find invoices that include 3 products manufactured in "Viet Nam" (3 distinct products).
  23. Find the customer (MAKH, HOTEN) with the highest number of purchases.
  24. Which month of 2006 had the highest sales revenue?
  25. Find the product (MASP, TENSP) with the lowest total quantity sold in 2006.
  26. For each country of manufacture, find the product (MASP, TENSP) with the highest selling price.
  27. Find the country of manufacture that produces at least 3 products with different selling prices.
  28. Among the top 10 customers by sales, find the customer with the highest number of purchases.
Full exercise - Week 3 practice (BTTH3) PDF file · questions 26 through 53, Part III Sales Management
Download ↓
This exercise uses the shared Sales Management schema (KHACHHANG, NHANVIEN, SANPHAM, HOADON, CTHD) - see the full attributes, sample data, and database script. View schema ›

ANSWER

View answer

Protected content

Enter the access code to view the Week 3 answer.

Access code provided by the instructor.