1pico=# select
2 sum(1),
3 date_trunc('month', updated_at) as month
4from projects
5group by month
6order by month DESC;
7 sum | month
8-----+---------------------
9 43 | 2024-10-01 00:00:00
10 46 | 2024-09-01 00:00:00
11 45 | 2024-08-01 00:00:00
12 29 | 2024-07-01 00:00:00
13 17 | 2024-06-01 00:00:00
14 27 | 2024-05-01 00:00:00
15 39 | 2024-04-01 00:00:00
16 59 | 2024-03-01 00:00:00
17 44 | 2024-02-01 00:00:00
18 9 | 2024-01-01 00:00:00
19 2 | 2023-11-01 00:00:00
20 6 | 2023-10-01 00:00:00
21 5 | 2023-09-01 00:00:00
22 1 | 2023-08-01 00:00:00
23(14 rows)