# 分两步得到 第一步 假设得到的值为1000000 SELECT FLOOR(COUNT(*) * 0.99) FROM (select count(*) as cnt from mytablename group by uid) tmpb; # 获取的第一个值即为99分位的数据 SELECT cnt FROM (select uid,count(*) as cnt from mytablename group by uid) tmpa ORDER BY cnt ASC LIMIT 1000000, 1;
标签:cnt,uid,99,mysql,80,分位 From: https://www.cnblogs.com/xuhuaiqu/p/17720260.html