摘要: mysql count group by统计条数方法 mysql 分组之后如何统计记录条数? gourp by 之后的 count,把group by查询结果当成一个表再count一次 select count(*) as count from (SELECT count(*) FROM 表名 WHERE 条件 GROUP BY id ) a; 实战例子: select count(*) as total from (select count(*) from users group by user_id) u 阅读全文
posted @ 2015-12-14 14:23 大自然的流风 阅读(44227) 评论(0) 推荐(1) 编辑