Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q: Write the queries that result in the following scenarios and display their outputs. Q1) Type the query that displays the cities -without repetition of

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Q: Write the queries that result in the following scenarios and display their outputs. Q1) Type the query that displays the cities -without repetition of all orders. Q2) Type the query that displays the order number and purchase amounts of all orders with the purchase amounts sorted from largest value to smallest value. Q3) Type the query that displays the order number, salesman's name and calculated commission amount earned per order. Name the output expression appropriately. Q4) Type the query that displays all information of orders that have purchase amounts that are larger than the average of all orders from the orders table. Q5) Type the query that displays all the information associated with orders done by non- graded customers. Q6) Type the query to display all the information of orders for the salesman who belongs to the city London. Q7) Type the query that selects the highest grade for each of the cities of the customers. Q8) Type the query that displays the orders of customers who are not based in New York city. Grade 100 200 Customer X Customer_ID. Customer_Name 3001 Nick Rimando 3002 Graham Zusi 3003 Brad Guzan 3004 Fabian Johns 3005 Brad Davis 3006 Geoff Camero 3007 Julian Green 3008 Jozy Altidor 0 City New York California London Paris New York Berlin London Moscow 300 Salesman_ID . Click to Add 5001 5002 5005 5006 5004 5003 5001 5006 0 + + 200 100 300 200 + 0 Click to Add Orders X Order_No. Purchase_AMT 70001 $270.65 70002 $110.50 70003 $948.50 70004 $2,400.60 70005 $5,760.00 70006 $1,983.43 70007 $2,480.40 70008 $75.29 70009 $3,045.60 0 $0.00 Order_Date . Customer_ID 9/10/2012 3001 10/5/2012 3008 9/10/2012 3005 7/27/2012 3007 9/10/2012 3002 10/10/2012 3003 10/10/2012 3005 8/17/2012 3006 4/25/2012 3005 0 Salesman_ID 5003 5003 5002 5004 5001 5004 5002 5004 5001 0 + Salesman X Salesman_ID 5001 5002 5003 5004 5005 5006 0 Name James Hoog Nail knite Pit Alex Mc Lyon Lauson Hen Paul Adam City New York Paris London Paris Rome Rome Commission - Click to Add 0.15 0.13 0.11 0.14 0.12 0.13 0 + + * Q: Write the queries that result in the following scenarios and display their outputs. Q1) Type the query that displays the cities -without repetition of all orders. Q2) Type the query that displays the order number and purchase amounts of all orders with the purchase amounts sorted from largest value to smallest value. Q3) Type the query that displays the order number, salesman's name and calculated commission amount earned per order. Name the output expression appropriately. Q4) Type the query that displays all information of orders that have purchase amounts that are larger than the average of all orders from the orders table. Q5) Type the query that displays all the information associated with orders done by non- graded customers. Q6) Type the query to display all the information of orders for the salesman who belongs to the city London. Q7) Type the query that selects the highest grade for each of the cities of the customers. Q8) Type the query that displays the orders of customers who are not based in New York city

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

Recommended Textbook for

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago