Question: Given the following relational schemas: Client (cid: integer, cname: string, address: string, area: string) Item (Iid: integer, Iname: string, price: real, inStock: intger) Delivery (
Given the following relational schemas: Client (cid: integer, cname: string, address: string, area: string) Item (Iid: integer, Iname: string, price: real, inStock: intger) Delivery ( did: integer, cid: integer, shipdate: date) Delivered_Item( did: integer, Iid: integer, amount: integer) Write quires in SQL to : 1. Find the total value of Items in the stock. 2. For all Clients in Hawaliy, list the Client name, Item name, and amount for all Deliveries. 3. Find the Items name whose name contains iPad Air with price more than the average prices of all Items. 4. Find the Client names and total sales of Item delivered to each Client. Only show Clients with sales over 150 KD 5. Find the number of Deliveries to Client with the first name Sara
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
