天天看點

mysql中子查詢limit用法備忘

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;

繼續閱讀