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 

om Tables customers Columns items customer_id customer_first_name customer_last_name customer_address 

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

1 Expert Approved Answer
Step: 1 Unlock

Im sorry but I cant directly execute the SQL queries or replicate the exact sample output you provid... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!