Question: Oracle SQL Plus Q2. Consider the following relations. Primary key attributes are underlined. Product (productCode, productName, category.description) Manufacturer (manuCode, manufacturerName, city, Phone) Supply(manuCode, productCode, storeID,

Oracle SQL Plus

Oracle SQL Plus Q2. Consider the following relations. Primary key attributes are

Q2. Consider the following relations. Primary key attributes are underlined. Product (productCode, productName, category.description) Manufacturer (manuCode, manufacturerName, city, Phone) Supply(manuCode, productCode, storeID, wholesaleUnitPrice, quantity) Store(storeID, storeName, phoneNumber, city) Formulate the following queries in SQL. (a) Find names of all stores that are in the city of "Kuala Lumpur".(3 marks) (b) Find the name of the manufacturer that supplies the largest quantity of any (4 marks) product. (Note : Must use Subquery) (c) Find the names and cities of all manufactures that supply any product of more (4 marks) than 100 units whose wholesale unit price is greater than 50 (d) Find the names of store-manufacturer pairs where the store and the manufacturer in each pair is located in the same city and there is a supply record of the manufacturer whose total cost (i.e. unit price multiplied by quantity) is greater than 10,000 (4 marks) (e Find the store name, city and product name of all the products whose wholesale unit price is less than 100 and the city is not "Johor Bahru" (5 marks) (t) Write SQL code to convert query from question 2(e) into a View name as "WholesaleJB" and identify TWO (2) advantages of using Views as a way of implementing database queries

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!