20251108073259.webp
P

20251108073259.webp

  • Media owner Panda89
  • Ngày thêm
Question paper (build 07.05.20.19)
Write an SQL query to list all menu items ordered by the customer named "Nguyễn Hoài
Phương", displaying the CustomerID, FullName, ItemID, and ItemName. Ensure that
duplicate records are not repeated in the result:
ItemName
Bún chả Hà Nội
CustomerID
FullName
ItemID
1
9
-23456782-
36
Nguyễn Hoài Phương 3
36
Nguyễn Hoài Phương 5
Cơm rang dưa bò
36
Nguyễn Hoài Phương
11
Nộm đu đủ bò khô
36
Nguyễn Hoài Phương 14
Súp ngô gà
36
Nguyễn Hoài Phương
15
Súp nấm hải sản
36
Nguyễn Hoài Phương
16
Trà đá
36
Nguyễn Hoài Phương
17
Nước suối
36
Nguyễn Hoài Phương
19
Sinh tố bơ
36
Nguyễn Hoài Phương
23
Nước chanh
10
36
Nguyễn Hoài Phương 26
Kem dua
Picture 3.1
Question 4:
Write an SQL query to list all tables whose locations include "Khu A", "Khu B" or "Khu C",
along with the customers who reserved them in September 2025. Ensure to include tables
even if no customer reserved them during that month. Show the following columns: TableID,
Capacity, Location, CustomerID, FullName. Sort the result in descending order of Capacity
and then by Location in ascending order for tables with the same capacity.
TableID Capacity Location
8
44732
123456
CustomerID FullName
8
Khu C - Trung tâm
7
6
Khu B - Gần quầy bar
4
6
Khu B - Gần quầy bar
24
6
Khu C - Gần sân khấu
4
4
Khu A - Góc phải
28
4
Khu A - Trung tâm
46
Bùi Thị Ngọc
Phạm Văn Cường
Lê Minh Hoàng
Phạm Văn Cường
Bùi Ngọc Linh
Phạm Văn Quang
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
777
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom