Customer Lifetime Value Summary
Medium
Analytics Case Studies
For each customer return the number of orders, the total amount spent and the average order value rounded to two decimals. Order by customer_id.
Table schema
Orders(id INT PRIMARY KEY, customer_id INT, amount INT)Sample data
id | customer_id | amount
1 | 1 | 100
2 | 1 | 50
3 | 2 | 30
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.