SQL Questions CTEs nad Windows Functions
SQL Questions CTEs nad Windows Functions
INTERVIEW
QUESTIONS DIFFICULTY - MEDIUM
ABHINAV SINGH
Question 1.
Write a query to find the top 5 products with the highest revenue in each
category.
Products Sales
ProductID: INT SaleID: INT
Name: VARCHAR(100) ProductID: INT
CategoryID: INT Amount: DECIMAL(10, 2)
Solution :
ABHINAV SINGH
Question 2.
Solution :
ABHINAV SINGH
Question 3.
Solution :
ABHINAV SINGH
Question 4.
Write a query to find the customer with the highest total purchase
amount in each region.
Customers Orders
CustomerID: INT OrderID: INT
Name: VARCHAR(100) CustomerID: INT
Region: VARCHAR(50) Amount: DECIMAL(10, 2)
Solution :
ABHINAV SINGH
Question 5.
Sales
SaleID: INT
SaleDate: DATE
Amount: DECIMAL(10, 2)
Solution :
ABHINAV SINGH