副選択を使用できます select * from table where client_id in (select distinct client_id from table order by client_id limit 5)