> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0586_customer_placing_the_largest_number_of_orders/slt.md).

# 思路1

GROUP BY + COUNT + LIMIT

用了group by之后的count，count的是分组内的数据的个数。不管count是出现在group by前还是后。

```sql
SELECT customer_number
FROM orders 
GROUP BY customer_number
ORDER BY COUNT(*) DESC
LIMIT 1;
```
