20251108073445.webp
P

20251108073445.webp

  • Media owner Panda89
  • Ngày thêm
Question paper (build 07.05.20.19)
1
10
8666444222
8447326759
23456789-
Khu C - Trung tâm
Khu B - Gần quầy bar
7
Bùi Thị Ngọc
4
Phạm Văn Cường
Khu B - Gần quầy bar
24
Khu C - Gần sân khấu
4
Khu A - Góc phải
28
Lê Minh Hoàng
Phạm Văn Cường
Bùi Ngọc Linh
Khu A - Trung tâm
46
Phạm Văn Quang
Khu B - Trung tâm
12
Đỗ Đức Thịnh
Khu A - Gần cửa sổ
NULL
NULL
2
Khu B - Cạnh tường
NULL
NULL
Khu C - Góc trái
NULL
NULL
4 of 4
Paper No: 10
Picture 4.1
Question 5:
Write an SQL query to list all customers whose full name starts with "Nguyễn" or "Bùi",
showing for each customer: CustomerID, FullName, the number of completed orders they
made in the year 2025 (column NumberOfOrders), and the total amount spent on those
orders (column TotalAmount). If a customer has no completed order in 2025, still display
their name with NumberOfOrders = 0 and TotalAmount = 0.
CustomerID FullName
NumberOfOrders TotalAmount
123-
1
7
Nguyễn Thị Mai
Bùi Thị Ngọc
2
1902000.00
0
0.00
8
Nguyễn Hoàng Nam
1
573000.00
11
Đùi Văn Lâm
0.00
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom