QUERY PLAN
Aggregate (cost=12.99..13.00 rows=1 width=8)
-> Sort (cost=12.92..12.93 rows=5 width=304)
Sort Key: r.id DESC
-> Seq Scan on tbl_erp_purchase_order_products r (cost=0.00..12.86 rows=5 width=304)
Filter: ((number <> into_inventory) AND (erp_purchase_order_id = 2204))