select owner,count(*) as count from table1 where owner in (select xx.owner from (select owner from table1 where DATE_SUB(CURDATE(), INTERVAL 1 DAY) <= date(date) and range>="75" group by owner order by count(*) desc limit 20) as xx) group by owner order by count desc;