1select year(order_date),month(order_date),count(*)
2 from sales
3 group by year(order_date),month(order_date)
4 order by year(order_date),month(order_date);
5+------------------+-------------------+-----------+
6| year(order_date) | month(order_date) | count(*) |
7+------------------+-------------------+-----------+
8| 2020 | 1 | 408 |
9| 2020 | 2 | 320 |
10| 2020 | 3 | 540 |
11| ... | ... | ... |
12+------------------+-------------------+-----------+