--------->
SELECT groupName,count(rs) '有' ,sum(ISNULL(rs)) '无' from mytable GROUP BY groupName;
--------->
SELECT groupName,count(rs) '有' ,sum(ISNULL(rs)) '无' from mytable GROUP BY groupName;
转载于:https://my.oschina.net/u/3755998/blog/2209276