QUERY PLAN
Aggregate (cost=4.00..4.01 rows=1 width=8)
-> Sort (cost=3.52..3.60 rows=32 width=322)
Sort Key: r.created_at DESC
-> HashAggregate (cost=2.40..2.72 rows=32 width=322)
Group Key: r.id
-> Seq Scan on tbl_erp_inventory_starts r (cost=0.00..2.32 rows=32 width=12)