use limit

select t.vid,max(c) from (select vid,count(*) as c from buys group by vid) t group by vid limit 1;