(Solved) : Question 3 Write Sql Query Lists Customers Cid Cname Pur Chased 22 10 2018 Product Bananas Q42765785 . . .

Question 3 Write an SQL query that lists the customers (cID and cName) who pur chased on 22-10-2018 the product Bananas atcustomer(cID, cName, street, city) Customers with unique clD and other attributes store(sID, sName, street, city) Stores with

Question 3 Write an SQL query that lists the customers (cID and cName) who pur chased on 22-10-2018 the product “Bananas” at more than one store. Two stores are considered to be different when they have a different store IDs -Write an SQL query that lists the cities where the product “Bananas” could not be purchased on “22-10-2018” anywhere (“The Great Banana Shortage Day”!) A product can not be purchased in a city if every store in that city does not have the product in its inventory or it has the product in its inventory with quantity of 0 customer(cID, cName, street, city) Customers with unique clD and other attributes store(sID, sName, street, city) Stores with a unique ID and other attributes. Stores with the same name but different slD (and address) form what we call a store chain. product(plD, pName, suffix) Products with a unique ID shoppinglist(cID. plD, quantity, date) What a customer wants to buy on a certain date. (Every customer creates at most one shoppinglist per day.) purchase(tID, clD, sID, plD, date, quantity, price) A transaction: what a customer bought in one go; every transaction (tID) corresponds to one customer (clD) buying from one store (sID) on one date (date); at some point during the course we see that this actually means tID cID,sID,date inventory(sID. plD. date, quantity, unit-price) Show transcribed image text Question 3 Write an SQL query that lists the customers (cID and cName) who pur chased on 22-10-2018 the product “Bananas” at more than one store. Two stores are considered to be different when they have a different store IDs -Write an SQL query that lists the cities where the product “Bananas” could not be purchased on “22-10-2018” anywhere (“The Great Banana Shortage Day”!) A product can not be purchased in a city if every store in that city does not have the product in its inventory or it has the product in its inventory with quantity of 0
customer(cID, cName, street, city) Customers with unique clD and other attributes store(sID, sName, street, city) Stores with a unique ID and other attributes. Stores with the same name but different slD (and address) form what we call a store chain. product(plD, pName, suffix) Products with a unique ID shoppinglist(cID. plD, quantity, date) What a customer wants to buy on a certain date. (Every customer creates at most one shoppinglist per day.) purchase(tID, clD, sID, plD, date, quantity, price) A transaction: what a customer bought in one go; every transaction (tID) corresponds to one customer (clD) buying from one store (sID) on one date (date); at some point during the course we see that this actually means tID cID,sID,date inventory(sID. plD. date, quantity, unit-price)

Expert Answer


Answer to Question 3 Write an SQL query that lists the customers (cID and cName) who pur chased on 22-10-2018 the product “Bananas…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us