Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In SQL without nesting, grouping or aggregation users(email, name, pwd, city, gender) products(pid, descr) sales(sid, lister, pid, edate, descr, cond, rprice) bids(bid, bidder, sid, bdate,

In SQL without nesting, grouping or aggregation

image text in transcribed

image text in transcribed

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) Write down the following queries in SQL and run them in SQLite3 over the database created. You will be writing ONE SQL statement for every query (here One SQL statement starts with a SELECT and ends with a semicolon but may include multiple select statements combined in the form of subqueries and/or using set operations). Your SQL queries for questions 1-3 cannot use any of aggregation, grouping, or nesting (set operations are ok). 1. Find the email and name of users who have had a bid on their own sales. 2. List sid, lister, condition and the reserved price of all sales which mention either ticket or voucher in their descriptions and have at least one bidder from Edmonton. 3. List sid and lister of all sales that end over the next 3 days but have no bids with an amount reaching or exceeding the reserved price. Hint: Check out date and time functions in SQLite

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

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago