DBI202_-_FA_2022_-_FE_241.webp
hirosi212

DBI202_-_FA_2022_-_FE_241.webp

Multiple choices 19/50
(Choose 1 answer)
Next
There is an auction database consists the following tables:
Member(memberID, memberName)
Auction_item(itemID, itemName, sellerID)
Bid(itemID, bidderID, bidPrice)
All registered members can put up item to sell (stored in auction_tem table), and can bid repeatedly one item (stored in bid table)
Current price of an item is maximum bidPrice
Which of the following SQL statement show the current price, and maximum price of the given bidder (storedin variable @memberID) for each item
A. Select itemID, itemName, MAX(b1.price) CurrentPrice, MAX(b2.bidPrice) MaxPriceOfBidder
From auction_item i, bid b1, bid b2 Where i.itemID = b1.itemID
And i.itemID = b2.itemID
And b1.bidderID = @memberID
Group by itemID, itemName
B. Select itemID, itemName, MAX(b1.price) CurrentPrice, MAX(b2.bidPrice) MaxPriceOfBidder
From auction item i, bid b1, bid b2 Where i.itemID = b1.itemID
And i.itemID = b2.itemID
And b2.bidderID = @memberID
Group by itemID, itemName
C. Select itemID, itemName, MAX(b1.price) CurrentPrice, MAX(b2.bidPrice) MaxPriceOfBidder
From auction item i, bid b1, bid b2
Where i.itemID = b1.itemID
And i.itemID = b2.itemID
And b1.bidderID = @memberIDAnd h2 hidderID = @memberID
1
2
3
4
5
6
7
8
9
10
11
12 13
14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29
30 31 32
33
34
35
36
37
38
39
40 41 47
43
44
45 46 47 48
49 50

Thông tin

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

Share this media

Back
Bên trên Bottom