Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**PLEASE LIST ALL OF THE QUERIES USING SQL/ORACLE FOR THE FOLLOWING STATEMENTS** THANK YOU TABLES TO BE USED 1. List the total number of parts

**PLEASE LIST ALL OF THE QUERIES USING SQL/ORACLE FOR THE FOLLOWING STATEMENTS** THANK YOU

TABLES TO BE USED

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

1. List the total number of parts ordered on each day. Rank your results in ascending order on order date.

List the full name and mailing address of customers who placed an order on 04-AUG-2013. If same customer has placed more than one order on this day, only show his/her information once.

List the order date, order number, total quoted price for each order placed between 03-AUG2013 and 06-AUG-2013.

List the average commission rate (rename to AVG_RATE) and the highest total commission (rename to MAX_COMMISSION) of sales representatives who sold SG class items.

List the warehouse number and the total number of orders from each warehouse.

2. List the full name of the sales representatives, order number, and total quoted price for each order (rename to TQP) handled by each sales representative.

List the part number and part description of parts with units on hand higher than the average units on hand across all parts.

List the full name and credit limit of customer who bought a Gas Grill.

List the warehouse number and total dollar amount of all items sold from that warehouse. Rename the calculated column TOTAL_VALUE. TOTAL_VALUE=SUM(NUMBER_ORDERED*QUOTED_PRICE).

3. List the part description of the part with the most units on hand.

List the part description of the part that was sold the most (in terms of total number ordered).

List the full name and number of different parts for each order each customer has placed. Rename the calculated column as TOTAL_PARTS.

List the order date of an order containing a part description with letter D (or d) in it.

4. List the customer name of those who purchased products with a unit price of more than $150.

List sales representative number and the number of customers handled by each sales representative who got paid at most as the average total commission. Rename the number of transactions as NO_Customers.

Tables Rows Last Analyzed lable Name CUSTOMER NEWCUST NEWTAB2 ORDERS ORDER LINE TABLE TABLE TABLE TABLE TABLE TABLE TABLE TABLE 1-8 PART PRICE_UPDATES SALES REP

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago

Question

What lessons in intervention design, does this case represent?

Answered: 1 week ago