(2) Consider the following Orders table. Write one SQL query that will compute the following from this table: (i) total number of orders, (ii) average purchase amount, (iii) maximum purchase amount, (iv) minimum purchase amount, and (v) total number of customers with purchase amounts greater than $1000. ord_no purch_amt ord_date customer_id salesman_id 70001 150.50 2012-10-05 3005 5002 70009 270.65 2012-09-10 3001 5005 70002 65.26 2012-10-05 3002 5001 70004 110.50 2012-08-17 3009 5003 70007 948.50 2012-09-10 3005 5002 70005 2400.60 2012-07-27 3007 5001 70008 5760.00 2012-09-10 3002 5001 70010 1983.43 2012-10-10 3004 5006 70003 2480.40 2012-10-10 3009 5003 70012 250.45 2012-06-27 3008 5002 70011 75.29 2012-08-17 3003 5007 70013 3045.60 2012-04-25 3002 5001
(2) Consider the following Orders table. Write one SQL query that will compute the following from this table: (i) total number of orders, (ii) average purchase amount, (iii) maximum purchase amount, (iv) minimum purchase amount, and (v) total number of customers with purchase amounts greater than $1000. ord_no purch_amt ord_date customer_id salesman_id 70001 150.50 2012-10-05 3005 5002 70009 270.65 2012-09-10 3001 5005 70002 65.26 2012-10-05 3002 5001 70004 110.50 2012-08-17 3009 5003 70007 948.50 2012-09-10 3005 5002 70005 2400.60 2012-07-27 3007 5001 70008 5760.00 2012-09-10 3002 5001 70010 1983.43 2012-10-10 3004 5006 70003 2480.40 2012-10-10 3009 5003 70012 250.45 2012-06-27 3008 5002 70011 75.29 2012-08-17 3003 5007 70013 3045.60 2012-04-25 3002 5001
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%

Transcribed Image Text:(2) Consider the following Orders table. Write one SQL query that will
compute the following from this table: (i) total number of orders, (ii)
average purchase amount, (iii) maximum purchase amount, (iv)
minimum purchase amount, and (v) total number of customers with
purchase amounts greater than $1000.
ord no purch_amt ord_date
customer_id salesman_id
70001
150.50
2012-10-05
3005
5002
70009
270.65
2012-09-10
3001
5005
70002
65.26
2012-10-05 3002
5001
70004
110.50
2012-08-17
3009
5003
70007
948.50
2012-09-10
3005
5002
70005
2400.60
2012-07-27 3007
5001
70008
5760.00
2012-09-10
3002
5001
70010
1983.43
2012-10-10
3004
5006
70003
2480.40
2012-10-10
3009
5003
70012
250.45
2012-06-27
3008
5002
70011
75.29
2012-08-17
3003
5007
70013
3045.60
2012-04-25
3002
5001
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education