Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

Simplify the following (a) 8abc 2ac (b) 2x+1 6x-x-2

Answered: 1 week ago

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago