QUERY PLAN
Aggregate (cost=3.00..3.01 rows=1 width=8)
-> Sort (cost=2.52..2.60 rows=32 width=322)
Sort Key: r.created_at DESC
-> HashAggregate (cost=1.40..1.72 rows=32 width=322)
Group Key: r.id
-> Seq Scan on tbl_erp_inventory_starts r (cost=0.00..1.32 rows=32 width=12)