QUERY PLAN
Aggregate (cost=27.65..27.66 rows=1 width=8)
-> Sort (cost=24.20..24.77 rows=230 width=318)
Sort Key: r.created_at DESC
-> HashAggregate (cost=12.88..15.18 rows=230 width=318)
Group Key: r.id
-> Seq Scan on tbl_erp_inventory_starts r (cost=0.00..12.30 rows=230 width=12)