QUERY PLAN
Aggregate (cost=3964.08..3964.09 rows=1 width=8)
-> Sort (cost=3933.89..3938.92 rows=2013 width=4240)
Sort Key: c.updated_at DESC
-> Subquery Scan on c (cost=115.16..155.42 rows=2013 width=4240)
-> HashAggregate (cost=115.16..135.29 rows=2013 width=4144)
Group Key: c_1.id
-> Seq Scan on tbl_clients c_1 (cost=0.00..110.13 rows=2013 width=12)