| Aggregate (cost=834.53..834.54 rows=1 width=8) |
| -> Append (cost=109.18..807.67 rows=10744 width=0) |
| -> Subquery Scan on sub (cost=109.18..155.40 rows=2311 width=0) |
| -> HashAggregate (cost=109.18..132.29 rows=2311 width=293) |
| Group Key: r.id |
| -> Result (cost=0.01..103.40 rows=2311 width=4) |
| One-Time Filter: (20012 = ANY ('{20018,20023,20024,20025,20026,20027,20012,20019}'::integer[])) |
| -> Seq Scan on tbl_erp_payment_tickets r (cost=0.01..103.40 rows=2311 width=4) |
| Filter: (is_payment_settle AND (status = 2)) |
| -> Subquery Scan on "*SELECT* 2" (cost=465.93..634.41 rows=8424 width=0) |
| -> HashAggregate (cost=465.93..550.17 rows=8424 width=293) |
| Group Key: r_1.id |
| -> Result (cost=0.01..444.87 rows=8424 width=4) |
| One-Time Filter: (20018 = ANY ('{20018,20023,20024,20025,20026,20027,20012,20019}'::integer[])) |
| -> Seq Scan on tbl_erp_cash_cost_tickets r_1 (cost=0.01..444.87 rows=8424 width=4) |
| Filter: (is_payment_settle AND (status = 2)) |
| -> Subquery Scan on "*SELECT* 3" (cost=12.02..12.04 rows=1 width=0) |
| -> Group (cost=12.02..12.03 rows=1 width=293) |
| Group Key: r_2.id |
| -> Sort (cost=12.02..12.03 rows=1 width=4) |
| Sort Key: r_2.id |
| -> Result (cost=0.01..12.01 rows=1 width=4) |
| One-Time Filter: (20019 = ANY ('{20018,20023,20024,20025,20026,20027,20012,20019}'::integer[])) |
| -> Seq Scan on tbl_erp_advance_payment_tickets r_2 (cost=0.01..12.01 rows=1 width=4) |
| Filter: (is_payment_settle AND (status = 2)) |
| -> Subquery Scan on "*SELECT* 4" (cost=1.23..1.31 rows=4 width=0) |
| -> HashAggregate (cost=1.23..1.27 rows=4 width=293) |
| Group Key: r_3.id |
| -> Result (cost=0.01..1.22 rows=4 width=4) |
| One-Time Filter: (20023 = ANY ('{20018,20023,20024,20025,20026,20027,20012,20019}'::integer[])) |
| -> Seq Scan on tbl_erp_wage_tickets r_3 (cost=0.01..1.22 rows=4 width=4) |
| Filter: ((settle_amount >= amount) AND (status = 2)) |
| -> Subquery Scan on "*SELECT* 5" (cost=1.15..1.16 rows=1 width=0) |
| -> Group (cost=1.15..1.15 rows=1 width=293) |
| Group Key: r_4.id |
| -> Sort (cost=1.15..1.15 rows=1 width=4) |
| Sort Key: r_4.id |
| -> Result (cost=0.01..1.14 rows=1 width=4) |
| One-Time Filter: (20024 = ANY ('{20018,20023,20024,20025,20026,20027,20012,20019}'::integer[])) |
| -> Seq Scan on tbl_erp_social_insurances r_4 (cost=0.01..1.14 rows=1 width=4) |
| Filter: (is_payment_settle AND (status = 2)) |
| -> Subquery Scan on "*SELECT* 6" (cost=1.11..1.12 rows=1 width=0) |
| -> Group (cost=1.11..1.11 rows=1 width=293) |
| Group Key: r_5.id |
| -> Sort (cost=1.11..1.11 rows=1 width=4) |
| Sort Key: r_5.id |
| -> Result (cost=0.01..1.10 rows=1 width=4) |
| One-Time Filter: (20025 = ANY ('{20018,20023,20024,20025,20026,20027,20012,20019}'::integer[])) |
| -> Seq Scan on tbl_erp_provident_funds r_5 (cost=0.01..1.10 rows=1 width=4) |
| Filter: (is_payment_settle AND (status = 2)) |
| -> Subquery Scan on "*SELECT* 7" (cost=1.12..1.14 rows=1 width=0) |
| -> Group (cost=1.12..1.13 rows=1 width=293) |
| Group Key: r_6.id |
| -> Sort (cost=1.12..1.12 rows=1 width=4) |
| Sort Key: r_6.id |
| -> Result (cost=0.01..1.11 rows=1 width=4) |
| One-Time Filter: (20026 = ANY ('{20018,20023,20024,20025,20026,20027,20012,20019}'::integer[])) |
| -> Seq Scan on tbl_erp_personal_taxs r_6 (cost=0.01..1.11 rows=1 width=4) |
| Filter: (is_payment_settle AND (status = 2)) |
| -> Subquery Scan on "*SELECT* 8" (cost=1.07..1.09 rows=1 width=0) |
| -> Group (cost=1.07..1.08 rows=1 width=293) |
| Group Key: r_7.id |
| -> Sort (cost=1.07..1.07 rows=1 width=4) |
| Sort Key: r_7.id |
| -> Result (cost=0.01..1.06 rows=1 width=4) |
| One-Time Filter: (20027 = ANY ('{20018,20023,20024,20025,20026,20027,20012,20019}'::integer[])) |
| -> Seq Scan on tbl_erp_wage_prizes r_7 (cost=0.01..1.06 rows=1 width=4) |
| Filter: (is_payment_settle AND (status = 2)) |