I'm trying to use sqlalchemy with postgresql to get data.
and I'd like to use this query
SELECT MONTH(date_field1), COUNT(*)
FROM table1
GROUP BY MONTH(date_field1)
so I can get the list of months and its count like below
month | count
1 | 3521
2 | 5222
3 | 1122
4 | 559
5 | 1664
6 | 3521
7 | 5222
8 | 1122
9 | 559
10 | 1664
11 | 559
12 | 1664