Q1_20251108073206.webp
M

Q1_20251108073206.webp

45
Lê Thị Tâm
347000.00
7
48
Võ Đức Tài
525000.00
1102000.00
255000.00
217.58%
-51.43%
Picture 7.1
Question 8:
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
8 of 8
Paper No: 7
Month
NumberOfOrders
1
1/2023 1
2345678
2/2023 0
0.00
3/2023 4
TotalRevenue
475000.00
3315000.00
4/2023
2
1390000.00
5/2023 1
575000.00
6/2023 4
2115000.00
7/2023 1
1105000.00
8/2023 1
1070000.00
Zoom
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
DBI202
Thêm bởi
morning_sun
Ngày thêm
Lượt xem
615
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom