Question: Given the e - commercial database schema shown below, write the following queries in ( 1 ) relational algebra and ( 2 ) SQL .
Given the ecommercial database schema shown below, write the following queries in relational algebra and SQL State your assumptions if the semantics are not clear.
itemiid iname, price, category, rating, month, year
customercid cname, cstreet, ccity
buytransID cid, iid, year, month, day
advertisecidiid
a Find customers who have only bought items with a rating greater than
b Find customers who have bought an item that was advertised to them.
c Find customers who bought two of the same items in the same month.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
