#736

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.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

idnameorders_count
1Аня3
2Боб1
3Вера2

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid