select count(*) from ( select Author from au_Content where Author is not null and NodeID=66 or NodeID=65 group by Author ) tb

原理是先查出所有行数,再进行count。注意后面的tb不能省。

 

http://blog.csdn.net/lsl861107/article/details/6690481

Published in MySQL
Tags: ,

No Responses to “SQL 分组group by 之后统计总数count”

Leave a Reply

请输入算式结果(看不清请点击图片)
(必须)