QUERY PLAN
Aggregate (cost=56.50..56.51 rows=1 width=8)
-> Group (cost=56.48..56.49 rows=1 width=330)
Group Key: sci.id
-> Sort (cost=56.48..56.49 rows=1 width=4)
Sort Key: sci.id
-> Seq Scan on tbl_sales_contract_invoices sci (cost=0.00..56.48 rows=1 width=4)
Filter: ((cover_invoice_id IS NULL) AND (contract_id = 3844))