QUERY PLAN
Aggregate (cost=44.71..44.72 rows=1 width=8)
-> Sort (cost=37.96..39.08 rows=450 width=611)
Sort Key: d.updated_at DESC
-> HashAggregate (cost=13.62..18.12 rows=450 width=611)
Group Key: d.id
-> Seq Scan on tbl_documents d (cost=0.00..12.50 rows=450 width=12)