TUTORIAL 3
7 APRIL 2025
INSTRUCTIONS:
1. Use subqueries for all answers except Question 1. Marks will not be awarded for code without a
subquery.
2. Watch the “How to run the Database” tutorial video.
3. Copy the link into your browser to access the Database: [Link]
samples/blob/master/samples/databases/northwind-pubs/[Link]
Question 1 (Marks: 3)
Write a union query to display the company names from both the Suppliers and Shippers tables.
Expected Outcome:
Question 2 (Marks: 4)
Write a query to determine if there are Products that have never been ordered. The query should
display the ProductName of the products that have not been ordered.
Include a comment under your query with the answer: "YES" or "NO" to the question.
Question 3 (Marks: 3)
Write an SQL query to display the order ID, freight cost, and the average freight cost.
NB: Expected Outcome returns 830 Records
Sample Results:
Question 4 (Marks: 5)
Write a query to calculate the average number of orders per customer for each country.
The query should display the customer ID, shipping country, and the average number of orders.
NB: Expected Outcome returns 89 Records
Sample Results:
Question 5 (Marks: 3)
Write a query to retrieve the details of employees who have participated in orders and whose first name
contains the letter "a." The query should display the employee's ID, first name, order ID, product name,
and order date.
NB: Expected Outcome returns 1825 Records
Sample Results:
END OF TUTORIAL