QUERY PLAN
Aggregate (cost=2.04..2.05 rows=1 width=32)
-> Nested Loop (cost=0.00..2.04 rows=1 width=32)
Join Filter: (esrps.erp_sales_return_id = t.id)
-> Seq Scan on tbl_erp_sales_return_products esrps (cost=0.00..1.01 rows=1 width=36)
-> Seq Scan on tbl_erp_sales_returns t (cost=0.00..1.01 rows=1 width=4)
Filter: ((verify_at <= '2025-12-31 23:59:59+08'::timestamp with time zone) AND (status = 2))