QUERY PLAN
GroupAggregate (cost=0.00..20.41 rows=1 width=159)
Group Key: e.id
-> Nested Loop Left Join (cost=0.00..20.39 rows=1 width=68)
Join Filter: (s.erp_sales_outbound_id = e.id)
-> Seq Scan on tbl_erp_sales_outbounds e (cost=0.00..6.31 rows=1 width=63)
Filter: ((id = 155) AND (status = 2))
-> Seq Scan on tbl_erp_inventory_product_spents s (cost=0.00..14.06 rows=1 width=9)
Filter: (erp_sales_outbound_id = 155)