In SQL(postgresql) How to group based on a "timestamp without time zone" column?
Try:
select
extract(year from activity_date) as year,
to_char(activity_date, 'Mon') as month,
count(*) as count
from
crimes
group by
1,extract(month from activity_date);