| Aggregate (cost=158.11..158.12 rows=1 width=8) |
| -> Sort (cost=156.88..157.08 rows=82 width=285) |
| Sort Key: sub.created_at |
| -> Subquery Scan on sub (cost=0.00..154.27 rows=82 width=285) |
| -> Append (cost=0.00..153.45 rows=82 width=285) |
| -> Seq Scan on tbl_sales_contracts r (cost=0.00..73.14 rows=65 width=175) |
| Filter: (build_by_project AND (erp_un_settle_amount > '0'::numeric)) |
| -> Subquery Scan on "*SELECT* 2" (cost=0.00..3.14 rows=14 width=210) |
| -> Seq Scan on tbl_erp_other_collect_tickets r_1 (cost=0.00..2.96 rows=14 width=208) |
| Filter: ((status = 2) AND ((amount - settle_amount) > '0'::numeric)) |
| -> Subquery Scan on "*SELECT* 3" (cost=0.00..76.52 rows=3 width=249) |
| -> Seq Scan on tbl_purchase_contracts r_2 (cost=0.00..76.49 rows=3 width=247) |
| Filter: ((NOT is_draft) AND (NOT is_refuse) AND (erp_un_settle_amount < '0'::numeric)) |