Answered step by step
Verified Expert Solution
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
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
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