QUERY PLAN
Aggregate (cost=11.67..11.68 rows=1 width=8)
-> Sort (cost=11.65..11.66 rows=1 width=588)
Sort Key: cd.created_at DESC
-> Group (cost=11.63..11.64 rows=1 width=588)
Group Key: cd.id
-> Sort (cost=11.63..11.64 rows=1 width=12)
Sort Key: cd.id
-> Seq Scan on tbl_client_documents cd (cost=0.00..11.62 rows=1 width=12)
Filter: (client_id = 1)