| Subquery Scan on sub (cost=202.36..263.20 rows=10 width=163) |
| Filter: (sub.id = 2326) |
| -> WindowAgg (cost=202.36..237.85 rows=2028 width=163) |
| -> Sort (cost=202.36..207.43 rows=2028 width=155) |
| Sort Key: sub_1.created_at DESC NULLS LAST |
| -> Subquery Scan on sub_1 (cost=50.40..90.96 rows=2028 width=155) |
| -> HashAggregate (cost=50.40..70.68 rows=2028 width=155) |
| Group Key: sci.id |
| -> Seq Scan on tbl_sales_contract_invoices sci (cost=0.00..45.33 rows=2028 width=155) |
| Filter: (cover_invoice_id IS NULL) |