insert into test values(1,'a','甲')
insert into test values(1,'a','甲')insert into test values(1,'a','甲')insert into test values(1,'a','甲')insert into test values(1,'a','乙')insert into test values(1,'b','乙')insert into test values(1,'b','乙')insert into test values(1,'b','乙')
select count(a),b,c from test group by c,b;
以c列分组:
第一组:1-5
第二组:6-8
以b列分组:
第一组:1-4
第二组:5
第三组:6-8