QUERY PLAN
Aggregate (cost=75.55..75.56 rows=1 width=32)
-> Seq Scan on tbl_purchase_contracts t (cost=0.00..70.54 rows=2003 width=6)
Filter: ((NOT is_draft) AND (NOT is_refuse) AND (NOT is_chargeback) AND (created_at < '2025-08-08 14:34:58+08'::timestamp with time zone))