QUERY PLAN
GroupAggregate (cost=77.28..77.64 rows=11 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=77.28..77.31 rows=11 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..77.09 rows=11 width=46)
Filter: ((NOT COALESCE(is_draft, false)) AND COALESCE(need_analysis, true) AND (signed_at >= '2026-01-01'::date) AND (signed_at <= '2026-12-31'::date))