Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQLITE3 QUERY QUESTION For each user who has had some bids, list the user email, the total number of distinct sales the user has had

SQLITE3 QUERY 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.

  • 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)

Clarifications: The lister is represented by an email, bidder is represented by an email.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students also viewed these Databases questions

Question

7. Identify six intercultural communication dialectics.

Answered: 1 week ago