0% found this document useful (0 votes)
31 views

SQL Questions

assignment for SQL subject

Uploaded by

samiul sarker
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

SQL Questions

assignment for SQL subject

Uploaded by

samiul sarker
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Scenario:

You are working for an online retail company. The company database has the following
tables:

1. Customers: Contains customer details.


2. Products: Contains product details.
3. Orders: Contains order details.
4. OrderDetails: Contains details of products within each order
Simple Questions:
● List all customers and the total number of orders they have placed.

● Find the total price of products in each order, but only include orders placed after
'2024-07-05'.

Intermediate Questions:
● Get the details of orders placed by customers from Germany, including the total
quantity of products in each order.

● Find the average price of products ordered by each customer, but only for customers
who have placed more than one order.

Advanced Questions:
● List customers who have ordered products from more than one category, and the count
of distinct categories they have ordered from.

● Find the order that generated the highest total revenue, and include the customer's
name and order date in the result.

You might also like