Average Orders per Customer

easy
Unit 3 · Aggregation II0/3 to milestone

Return one row with customers (total number of customers), orders (total orders) and orders_per_customer (orders divided by all customers, including those who never ordered), rounded to 2 decimals.

Schema

customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)
#aggregation#subqueries1 visible + 1 hidden tests
query.sql · SQLite
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Average Orders per Customer · TechGradify