QUERY PLAN
GroupAggregate (cost=79.35..81.28 rows=59 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=79.35..79.50 rows=60 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.58 rows=60 width=46)
Filter: ((NOT COALESCE(is_draft, false)) AND COALESCE(need_analysis, true) AND (signed_at >= '2025-01-01'::date) AND (signed_at <= '2025-12-31'::date))