QUERY PLAN
Aggregate (cost=281.99..282.00 rows=1 width=104)
-> Hash Semi Join (cost=156.61..281.18 rows=80 width=47)
Hash Cond: (tbl_purchase_contracts.id = pc.id)
-> Seq Scan on tbl_purchase_contracts (cost=0.00..117.72 rows=2272 width=47)
-> Hash (cost=155.61..155.61 rows=80 width=4)
-> Hash Right Join (cost=135.76..155.61 rows=80 width=4)
Hash Cond: (pcp1.purchase_contract_id = pc.id)
-> Seq Scan on tbl_purchase_contract_contact_points pcp1 (cost=0.00..17.80 rows=780 width=8)
-> Hash (cost=134.76..134.76 rows=80 width=4)
-> Seq Scan on tbl_purchase_contracts pc (cost=0.00..134.76 rows=80 width=4)
Filter: ((NOT is_draft) AND (NOT is_verify) AND (signed_at >= '2026-01-01'::date) AND (signed_at <= '2026-12-31'::date) AND (cost_type = 1))