Question: Please turn in only one SQL file (or a .txt file) and submit it to the Assignment Submission Folder assigned for the homework. Answer the

 Please turn in only one SQL file (or a .txt file)

and submit it to the Assignment Submission Folder assigned for the homework.

Please turn in only one SQL file (or a .txt file) and submit it to the Assignment Submission Folder assigned for the homework.

Answer the following questions. Make sure you use comments in your SQL file to clarify/show which SQL statement is the answer to which question. The questions are:

  1. Write a query to show payments that each customer has made so far. Show Customer name, check number, and payment date
  2. Write a query to show orders made by each customer has made so far. Show Customer name, Order date, Required date, and Shipped date.
  3. Write a query to show the office location of each employee. Show employee's first and last name, addressline1, state, country.
  4. Write a query to show the name of the products for each order.
  5. Write a query to show the orderNumber, product name, and quantity ordered.
  6. Write a query to show the product code, product name, and image of the product line (join products and productlines).
  7. Write a query to show the customer number, payment amount, and order number (join three tables; orders, customers, and payments).
  8. Write a query to show the order number, customer number, and customers' city.

orders orderNumber INT order Date DATE requiredDate DATE shippedDate DATE status TEXT comments TEXT customer Number INT Indexes customers customer Number INT customer Name VARCHAR(255) contact, astName VARCHAR(255) contacFirstName VARCHAR(255) payments phone VARCHAR (255) ID INT addressLine1 VAROHAR (255) customerNumber INT addressLine2 VARCHAR(255) --- check Number VARCHAR(255) city VARCHAR(255) paymentDate DATE state VARCHAR(255) amount DOUBLE postal Code VARCHAR(255) Indexes country VAROMAR (255) salesRepEmployeeNumber INT credit. imit DECIMA.(3.2) Indexes products product Code VARCHAR(10) orderdetails productName TEXT ID INT orderNumber INT productLine VARCHAR(255) productScale TEXT product Code VARCHAR(10) quantityOrdered INT --IproductVendor TEXT product Descripton TEXT priceach DOUBLE quantityInStock INT orderlineNumber INT buyPrice DOUBLE Indexes MSRP DOUBLE Indexes productlines productLine VARCHAR(255) textDescription TEXT htmlDescription TEXT image TEXT Indexes offices officeCode INT city TEXT phone TEXT addressLine1 TEXT addressLine2 TEXTE state TEXT country TEXT postal Code TEXT territory TEXT Indexes employees employeeNumber INT lastName TEXT firstName TEXT extension TEXT emal TEXT officeCode INT reportsToTEXT jobTitle TEXT Indexes

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!