How can I limit a result set to n distinct values of a given column(s), where the actual number of rows may be higher?
Input table:
client_i
You can use a subselect
select * from table where client_id in (select distinct client_id from table order by client_id limit 5)