Question: 5 1. a) Given the following relational schema, write queries in SQL to answer the following queries Customer (cid, cname, address, city, state) Product (pid,

 5 1. a) Given the following relational schema, write queries in

5 1. a) Given the following relational schema, write queries in SQL to answer the following queries Customer (cid, cname, address, city, state) Product (pid, pname, price, inventory) Shipment(sid, cid, shipdate) ShippedProduct(sid, pid, amount) i. Return the products (name) whose name contains Rahim with a price more than the average price. ii. Find shipping date, the number of shipments to customers with first name Scott. b) Consider the following Relational Database. Doctor (dno, dname, address,dcity) Hospital (hno, hname, street,hcity) Dochosp (dno, hno, date) Write the SQL statement to find the following result i. Find hospital names to which Dr. Mehbub' has visited. ii. Find out all the doctors who have visited hospitals in the same city. iii. List Name of hospital to which Dr. Aman' has visited on 5-3-2019 5

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!