Question
Using the om database, replicate the sample output below which provides information about customers and their shopping history. Include the customer name, total number of
Using the om database, replicate the sample output below which provides information about customers and their shopping history. Include the customer name, total number of orders placed, total quantity ordered, total amount spent, average quantity per order, average amount spent per order. You must accomplish this with either a subquery or CTE structure, it is your choice. Pay attention to the structure directions on page 1 of this document. (+2 points bonus): Provide a short explanation of why you used either option (+2 points bonus). Your result set should look like this, including results, sort, column headers, and all formatting
aspects:
Customer Name No. of Orders Total Ordered Quantities Anders Rohansen 2 Ania Irvin Dakota Baylee Deborah Damien 2 Julian Carson Justin Javen Kaitlin Hostlery Karina Lacy Derek Chaddick Erick Kaleigh Gonzalo Keeton 1 Johnathon Millerton 2. 1 1 2 1 2 1 3 2 1 7 1 2 1 2 1 13 Total Amount Spent $34.90 $17.00 $51.40 $33.95 $17.95 $121.25 $17.95 $34.90 $17.95 $34.90 $17.95 $204.20 Average Order Quantity 1.00 1.00 1.50 2.00 1.00 2.33 1.00 1.00 1.00 1.00 1.00 3.25 Average Order Amount $17.45 $17.00 $25.70 $33.95 $17.95 $40.42 $17.95 $17.45 $17.95 $17.45 $17.95 $51.05
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
Im sorry but I cant directly execute the SQL queries or replicate the exact sample output you provid...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started