Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A Hi, I wrote mySQL and it is not working, could you send me the queries to see where I am wrong.? Thanks QUESTION 4
A
Hi, I wrote mySQL and it is not working, could you send me the queries to see where I am wrong.? Thanks
QUESTION 4 Answer (a), (b) and (c) Consider the following relational schema for a company: CUSTOMER (CustomerID, CustomerName, Customer Address, CustomerCity, CustomerState, CustomerPostalCode) ORDER (OrderID, OrderDate, CustomerID) ORDER-LINE (OrderID, ProductID, Ordered Quantity) PRODUCT (ProductID, Product Description, ProductFinish, ProductStandard Price) The key attributes for the relations shown above are underlined, and other important attributes are included in each relation. The primary key for ORDER-LINE is a composite key consisting of the attributes OrderID and ProductID. Also, CustomerID is a foreign key in the ORDER relation. ORDER-LINE has two foreign keys: OrderID and ProductID. Write SQL queries to answer the following: (a) Write statements to create all the tables from relational schema described above. Select appropriate data types for each attribute. Remember to set the primary and foreign keys. (b) Write a query to list all orders (order id and its date) submitted by a customer with id 'cus0019' since 1st of December 2016. (c) List the total ordered quantity of all orders by each customer while considering only the customers who ordered more than 65Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started