SQL 4 – Assignment

PRACTICE QUESTIONS FOR SUB-MODULE 4

Instructions for Practice Questions

To effectively practice SQL joins, use the provided dataset, which includes the following tables:

  • Customers (customer details)
  • Orders (order transactions)
  • Products (electronic product details)

Your Task:

  1. Use SQL queries to answer each practice question.
  2. Write and execute your SQL code using Microsoft SQL Server or any preferred SQL environment.
  3. Ensure your queries retrieve the correct data based on the given scenarios.
  4. If needed, modify or expand your queries to explore additional insights.

Reminder: Always reference the dataset structure to correctly use column names in your queries.

Happy Querying! 

QUESTIONS

  1. Write an SQL query to find the number of orders placed by each customer.
  2. Write an SQL query to find the total revenue generated for each product in the Orders table.
  3. Write an SQL query to find customers who have spent more than $5000 in total orders

EXTRACT THE SCRIPT OF YOUR QUERY AND UPLOAD.