QUERY PLAN
Aggregate (cost=2.08..2.09 rows=1 width=32)
-> Nested Loop (cost=0.00..2.08 rows=1 width=32)
Join Filter: (r.erp_wage_prize_id = t.id)
-> Seq Scan on tbl_erp_wage_prize_bank_outs r (cost=0.00..1.02 rows=1 width=36)
Filter: (erp_bank_id = 2)
-> Seq Scan on tbl_erp_wage_prizes t (cost=0.00..1.04 rows=1 width=4)
Filter: (is_payment_settle AND (status = ANY ('{2,5}'::integer[])))