QUERY PLAN
Aggregate (cost=27.79..27.80 rows=1 width=8)
-> Sort (cost=27.76..27.76 rows=2 width=588)
Sort Key: cd.created_at DESC
-> Group (cost=27.74..27.75 rows=2 width=588)
Group Key: cd.id
-> Sort (cost=27.74..27.74 rows=2 width=12)
Sort Key: cd.id
-> Seq Scan on tbl_client_documents cd (cost=0.00..27.73 rows=2 width=12)
Filter: (client_id = 982)