Q1_20251108074550.webp
Jellal87

Q1_20251108074550.webp

  • Media owner Jellal87
  • Ngày thêm
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
-Total Revenue - 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: 5
Month
1
1/2023 1
NumberOfOrders Total Revenue
475000.00
234567
2
2/2023 0
0.00
3/2023
4
3315000.00
4/2023
2
1390000.00
5
5/2023 1
575000.00
6
6/2023 4
2115000.00
7/2023
1
8
8/2023 1
1105000.00
1070000.00
017000 on
010000
Zoom
+ 56%
Close

Thông tin

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

Share this media

Back
Bên trên Bottom