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 users who have received at least 3 reviews, find the email and the average review rating. Limit the result to only top 5 users with the highest average review ratings, and sort the results in a descending order of average review ratings. Hint: check out the limit function in Sqlite

1. email is the primary key for users
2. pid is the primary key for products
3. sid is the primary key for sales and lister (lister email) is the foreign key for sales from users
4. bid is the primary key for bids and bidder (bidder email) is the foreign key for bids from users and sid is the foreign key for bids from sales
5. sid is the primary key for items and pid is the foreign key for items from sales
6. reviewer (email) is the primary key for reviews
7. rid is the primary key for previews

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

Students also viewed these Databases questions

Question

4. Present and defend your CSS to the class at large.

Answered: 1 week ago

Question

3. Identify opportunities to improve this process.

Answered: 1 week ago

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

9. Explain the relationship between identity and communication.

Answered: 1 week ago