QUERY PLAN
Aggregate (cost=2.08..2.09 rows=1 width=8)
-> HashAggregate (cost=1.39..1.70 rows=31 width=318)
Group Key: r.id
-> Seq Scan on tbl_erp_inventory_starts r (cost=0.00..1.31 rows=31 width=4)