QUERY PLAN
Aggregate (cost=44.44..44.45 rows=1 width=8)
-> Sort (cost=37.73..38.85 rows=447 width=611)
Sort Key: d.updated_at DESC
-> HashAggregate (cost=13.59..18.06 rows=447 width=611)
Group Key: d.id
-> Seq Scan on tbl_documents d (cost=0.00..12.47 rows=447 width=12)