QUERY PLAN
GroupAggregate (cost=82.27..86.09 rows=117 width=72)
Group Key: (to_char((signed_at)::timestamp with time zone, 'YYYY-MM'::text)), (date_part('month'::text, (signed_at)::timestamp without time zone))
-> Sort (cost=82.27..82.57 rows=119 width=46)
Sort Key: (to_char((signed_at)::timestamp with time zone, 'YYYY-MM'::text)), (date_part('month'::text, (signed_at)::timestamp without time zone))
-> Seq Scan on tbl_sales_contracts c (cost=0.00..78.17 rows=119 width=46)
Filter: (COALESCE(need_analysis, true) AND (signed_at >= '2025-01-01'::date) AND (signed_at <= '2025-12-31'::date))