Show every customer's order count

Show every customer's order count

Support wants an order count next to every customer — to instantly tell regulars from those who just signed up. For each customer return id, name and the total number of their orders of any status (new customer — zero). Name the count column orders_count, sort by customer id.

Row order matters

Expected output columns:idnameorders_count

Showing the first 3 rows of the sample — the full sample comes with Premium

Similar tasks

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid