Given a table Sales with columns SalesID, ProductID, SaleDate, and SaleAmount,…
Given a table Sales with columns SalesID, ProductID, SaleDate, and SaleAmount, which SQL query retrieves the average sale amount for each month in the year 2024?
- A.
SELECT MONTH(SaleDate), AVG(SaleAmount) FROM Sales WHERE YEAR(SaleDate) = 2024 GROUP BY MONTH(SaleDate);
- B.
SELECT AVG(SaleAmount) FROM Sales WHERE YEAR(SaleDate) = 2024;
- C.
SELECT SaleDate, AVG(SaleAmount) FROM Sales WHERE YEAR(SaleDate) = 2024;
- D.
SELECT MONTH(SaleDate), SUM(SaleAmount) FROM Sales WHERE YEAR(SaleDate) = 2024 GROUP BY SaleDate;
Attempted by 203 students.
Sign up free to check your answer
Sign up freeLoading lesson…

