84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
请教一个sql 问题列如表A有四个字段f1,f2,f3,f4,我要获得分组统计数据当f1='a'时,select f1,f2,count(1) from A group by f1,f2当f1='b'时,select f1,f3,count(1) from A group by f1,f3当f1='c'时,select f1,f4,count(1) from A group by f1,f4这可以在一个语句中写出来吗?除了union的方式数据库环境:mysql
see: http://sqlfiddle.com/#!9/241bf6/5
see: http://sqlfiddle.com/#!9/241bf6/5