Published on

SQL Problems 40

Authors
Time yourself:
Your progress:

00:30:00

0%

Database Schema

Database Schema

Select

1. Calculate the total quantity of products sold for each product_id

Flag important question
Mark as complete

2. Retrieve all orders placed in November 2023 using date filtering.

Flag important question
Mark as complete

3. Find all products with a price greater than the average price of all products.

Flag important question
Mark as complete

Joins and Relationships

4. Retrieve all products along with their category names using a join.

Flag important question
Mark as complete

5. Find the total revenue (price * quantity) for each product.

Flag important question
Mark as complete

6. For each category, calculate the total revenue generated by all products in that category.

Flag important question
Mark as complete

7. List all categories with no products assigned.

Flag important question
Mark as complete

8. List all products that have never been ordered (not present in the Orders table).

Flag important question
Mark as complete

9. Retrieve the top 2 products with the highest total revenue using a limit or ranking function.

Flag important question
Mark as complete

Advanced Select and Joins

10. Find the product with the highest total revenue, including its name and category.

Flag important question
Mark as complete

SQL Functions

11. For each product, calculate the running total of quantities sold over time using window functions.

Flag important question
Mark as complete