QUERY PLAN
Aggregate (cost=3.93..3.94 rows=1 width=8)
-> Sort (cost=3.47..3.54 rows=31 width=322)
Sort Key: r.created_at DESC
-> HashAggregate (cost=2.39..2.70 rows=31 width=322)
Group Key: r.id
-> Seq Scan on tbl_erp_inventory_starts r (cost=0.00..2.31 rows=31 width=12)