我有一张桌子
students[std_id, name, class, gender,etc]
select class,gender,count(*) as total_students
from students
group by class,gender
它的输出如下
1st | male | 23
1st | female | 11
2nd | male | 17
2nd | female | 0
//最后一行没有显示,因为二班有0个女学生
如何使用 total_sudents=0 使其如上所示,而不是跳过记录。