mysql 怎么查询出,分组后的总条数。。。也就是有多少组数。。。。怎么写
时间:2014-04-28 14:40:10
收藏:0
阅读:937
SELECT
COUNT(*) AS 多少组数
FROM
(
SELECT id FROM 表 GROUP BY id
) subQuery;
Mysql,有一个表含有以下字段,uid 发帖人id,title 发帖标题,tc 发帖内容,time 发帖时间,用一条语句算出昨天发帖书大于10的,一共有多少人?
select count(*) from (select distinct startperson_id,count(startperson_id) as num from apphome_finance group by startperson_id having num>10 and startperson_id=2)subQuery;
评论(0)