QUERY PLAN
Aggregate (cost=41.33..41.34 rows=1 width=8)
-> Sort (cost=39.06..39.44 rows=151 width=588)
Sort Key: cd.created_at DESC
-> HashAggregate (cost=32.09..33.60 rows=151 width=588)
Group Key: cd.id
-> Seq Scan on tbl_client_documents cd (cost=0.00..31.71 rows=151 width=12)
Filter: (client_id = 149)