Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In SQL users(email, name, pwd, city, gender) products(pid, descr) sales(sid, lister, pid, edate, descr, cond, rprice) bids(bid, bidder, sid, bdate, amount) items(sid, no, pid, descr)
In SQL
users(email, name, pwd, city, gender) products(pid, descr) sales(sid, lister, pid, edate, descr, cond, rprice) bids(bid, bidder, sid, bdate, amount) items(sid, no, pid, descr) reviews(reviewer, reviewee, rating, rtext, rdate) previews(rid, pid, reviewer, rating, rtext, rdate) 7. For each user who has had some bids, list the user email, the total number of distinct sales the user has had bids on, the number of winning bids, and the total dollar amount of the wining bids. The user has a winning bid if the sale is over (i.e., the end date is in the past), the user has the highest bid and the bid amount is not less than the reserved price. The result should include users who have no winning bids. Hint: subqueries can be used in the from clauseStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started