Orders Columns: order_id (int), order_no (char(30)), customer_name (char(100)) Order_Line Columns: line_id (int), order_id (int), amount (float) Which SQL statement will return an average amount for each Customer? Results must include Customers that have more than 10 Ord OA: SELECT o.customer_name, avg(ol.amount) FROM orders o, order_line ol WHERE ol.order_id = 0.order_id GROUP BY o.customer name HAVING count (DISTINCT o.order_id) > 10 B: SELECT 0.customer_name, avg(ol.amount) FROM orders o, order line ol
Orders Columns: order_id (int), order_no (char(30)), customer_name (char(100)) Order_Line Columns: line_id (int), order_id (int), amount (float) Which SQL statement will return an average amount for each Customer? Results must include Customers that have more than 10 Ord OA: SELECT o.customer_name, avg(ol.amount) FROM orders o, order_line ol WHERE ol.order_id = 0.order_id GROUP BY o.customer name HAVING count (DISTINCT o.order_id) > 10 B: SELECT 0.customer_name, avg(ol.amount) FROM orders o, order line ol
Chapter11: Group Functions
Section: Chapter Questions
Problem 13MC
Related questions
Question
Please give a detailed answer to the below question.
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
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning