PE_-_DBI_-_02_-_SP_2024_-_Block_10_1501.webp
May76

PE_-_DBI_-_02_-_SP_2024_-_Block_10_1501.webp

  • Media owner May76
  • Ngày thêm
6 of 6
Paper No: 1
Question 6:
Write a query to get the best-selling products in 2016; the result includes: product_id,product_name
product_id product_name
6
Surly Ice Cream Truck Frameset - 2016
Picture 6.1
1
Question 7:
Write a query to get the products that have not been sold in 2017. The result includes:product_id, product_name, sum of quantity in stocks
product_id product_name
1
112
Trek 820-2016
sum of quantity in stocks
55
Trek 820-2018 42
Trek Marlin 5-2018 54
Trek Marlin 6-2018 27
Trek Fuel EX 8 29-2018 54
Trek Marlin 7-2017/2018 71
Trak Ticket S Frame - 2018 56
Picture 7.1
1
2
3 113
4 114
5 115
6
7
116
117
Question 8:
Create a trigger named Tri_Del for the delete statement on table stocks so that when we delete one or more rows from the table stocks, the system will display the product_id,product_name, store_id, store_name, quatity corresponding to the rows that have been deleted.
For example, when we execute the following statement, the results should be as in the following figure:
DELETE FROM stocks

+ 100%
Zoom
Close

Thông tin

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

Image metadata

Filename
PE_-_DBI_-_02_-_SP_2024_-_Block_10_1501.webp
File size
215.1 KB
Dimensions
1920px x 907px

Share this media

Back
Bên trên Bottom