Question: Q1) Write following SQL Queries: 1. List the order number, order date, customer number, customer name (first and last), employee number, and employee name (first

Q1) Write following SQL Queries: 1. List the order number, order date, customer number, customer name (first and last), employee number, and employee name (first and last) of January 2017 orders placed by Colorado customers. 2. List the customer number, name (first and last), order number, order date, employee number, employee name (first and last), product number, product name, and order cost (OrdLine.Qty * ProdPrice) for products ordered on January 23, 2017, in which the order cost exceeds $150. 3. List the order number and total amount for orders placed on January 23, 2017. The total amount of an order is the sum of the quantity times the product price of each product on the order. 4. List the order number, order date, customer name (first and last), and total amount for orders placed on January 23, 2017. The total amount of an order is the sum of the quantity times the product price of each product on the order.

Q1) Write following SQL Queries: 1. List the order number, order date,

use this relational schema to write queries

Relational Schema CUSTOMER P. CUSTNO CHAR (8 BYTE) CUSTFIRSTNAME VARCHAR2 (20 BYTE) CUSTLASTNAME VARCHAR2 (30 BYTE) CUSTSTREET VARCHAR2 (50 BYTE) CUSTCITY VARCHAR2 (30 BYTE) CUSTSTATE CHAR (2 BYTE) CUSTZIP CHAR (10 BYTE) CUSTBAL NUMBER (12,2) EMPLOYEE PEMPNO CHAR (8 BYTE) EMPFIRSTNAME VARCHAR2 (20 BYTE) EMPLASTNAME VARCHAR2 (30 BYTE) EMPPHONE CHAR (15 BYTE) U EMPEMAIL VARCHAR2 (50 BYTE) F SUPEMPNO CHAR (8 BYTE) EMPCOMMRATE NUMBER (3,3) V 1 1 1 IP-ORDNO ORDDATE IF CUSTNO F EMPNO ORDNAME ORDSTREET ORDCITY ORDSTATE ORDZIP ORDERTBL CHAR (8 BYTE) DATE CHAR (8 BYTE) CHAR (8 BYTE) VARCHAR2 (50 BYTE) VARCHAR2 (50 BYTE) VARCHAR2 (30 BYTE) CHAR (2 BYTE) CHAR(10 BYTE) ORDLINE PF" ORDNO PF PRODNO QTY CHAR (8 BYTE) CHAR (8 BYTE) NUMBER C.0) PRODUCT IP PRODNO CHAR (8 BYTE) PRODNAME VARCHAR2 (50 BYTE) PRODMFG VARCHAR2 (20 BYTE) PRODQOH NUMBER (,0) PRODPRICE NUMBER (12,2) PRODNEXTSHIPDATE DATE

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!