Question 1 of 30
A retail company is analyzing its sales data stored in a relational database. The database contains a table named `Sales` with the following columns: `SaleID`, `ProductID`, `Quantity`, `SaleDate`, and `TotalAmount`. The company wants to retrieve the total sales amount for each product sold in the month of March 2023. Which SQL query would correctly achieve this result?
`SELECT ProductID, SUM(TotalAmount) AS TotalSales FROM Sales WHERE SaleDate BETWEEN '2023-03-01' AND '2023-03-31' GROUP BY ProductID;`
`SELECT ProductID, COUNT(TotalAmount) AS TotalSales FROM Sales WHERE SaleDate >= '2023-03-01' AND SaleDate <= '2023-03-31' GROUP BY ProductID;`
`SELECT ProductID, AVG(TotalAmount) AS TotalSales FROM Sales WHERE SaleDate > '2023-03-01' AND SaleDate < '2023-03-31' GROUP BY ProductID;`
`SELECT ProductID, MAX(TotalAmount) AS TotalSales FROM Sales WHERE SaleDate >= '2023-03-01' AND SaleDate <= '2023-03-31' GROUP BY ProductID;`

Preparing for Microsoft 98-364 Database Fundamentals? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free