Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In sqlite please 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,

In sqlite please

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)

Question:

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 clause.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. What is meant by Latitudes? 2. What is cartography ?

Answered: 1 week ago