1. Engineering
  2. Computer Science
  3. sql query answer 3 7...

Question: sql query answer 3 7...

Question details
SQL Query (answer #3 - #7)

CUST This is a table with information about customers of DU Corp. The attributes are: C# Customer # NAME Customer Name CITY City (where the Customer Score (number C SCORE customer is located)between O and 10) 532 John Smith Chicago 6 PROD This is a table with information about the products that the company currently sells. Product #s are unique, but names are not. The attributes are: NUM H UPRICE product) 123.56 True NEW P# Product # NAME Product Name Number on Hand Unit Price (Price of each Boolean field that (Inventory) specifies if the product is new or used 9A2B Desk ORDERS This is a table with information about the orders received by the company. Not all of the customers currently have orders placed. Á customer can have multiple orders. An order can have multiple products in it, but each product would only appear once. The attributes are: С.NUM Customer Number P# Product Number QNTY Quantity Purchased pecial SPECIAL ORDER# Order# 238 532 9A2B Ship Frozen

1. What are the primary keys for these three tables? C# PA . ORDER# 2. Write a query to get the number and name for all customers that are located in Elgin and have scores under 6. SELECT C#, NAME FROM CUST WHERE CITY Elgin, AND C-SCORE <6; 3. Write a query to get the number and name of products that have no orders. 4. Write a query to get the order, customer and product numbers for all orders of new products that cost over $50 and have more than 2 shipped in an order. 5. Write a query to get the names and cities of customers that have bought every product 6. Write a query to get the customer name and product price for all new chairs that have been ordered. 7. Write a query to get the order number, product number and quantity ordered for all orders by Chicago suppliers with a score above 5.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution