For Question 4, you need to get the average sales per item b…

Written by Anonymous on February 23, 2026 in Uncategorized with no comments.

Questions

Fоr Questiоn 4, yоu need to get the аverаge sаles per item by invoice month and invoice year, sorted in ascending order by the invoice month and the invoice year.   If you're not sure how to put the query together, follow the steps below, otherwise jump to the question in the last line: 1)Can you use the same join as in the previous question? If so, proceed to the next step. If not tweak the join. 2) To get the average sales by invoice month and invoice year, you need to aggregate by those fields.  You can obtain the invoice month and year by using the MONTH() and YEAR() functions on the invoice_date.  Use GROUP BY on the invoice month and year and aggregate (AVG) the product of price per unit and units sold. Use the alias 'average_sales' for this aggregated column. 3) Sort the output by ascending order of the invoice month and invoice year.  4) ROUND the sales to a whole number Part of the output will look similar to this (#Average_Sales are hidden though) :   Question: Get the average sales by invoice month and invoice year, sorted in ascending order by invoice month and year. Round the average sales to whole numbers. Observe the output. Across which months did the average sales change by less than $2 between 2023 and 2024?  

Comments are closed.