Question paper (build 07.05.20.19)
5
43
67
45
Lê Thị Tâm
Nguyễn Lan Hương 1705000.00
347000.00
48
Võ Đức Tài
525000.00
Question 8:
Picture 7.1
680000.00
-60.12%
1102000.00
255000.00
217.58 %
-51.43 %
Write a stored procedure named MonthlySalesSummary that generates a monthly sales
report for a specified year. Your procedure must accept one input parameter: @year int - the
year for which the report will be generated. The procedure must display all 12 months (from
January to December), even if there are no orders in a given month. For each month,
calculate and display:
- Month - in the format Month/Year
- NumberOfOrders - the total count of completed orders in that month
- TotalRevenue - the total revenue (sum of Quantity * Price) from all completed orders in that
month
For example, when we execute the MonthlySalesSummary procedure by using the following
query, the results must be shown as in the following figure:
execute MonthlySalesSummary 2023
7 of 7
Paper No: 10
Month
NumberOfOrdore
ميصصTetalDe