比如select出a,b两个字段,但只想distinct a,方法:

select a,b,count(distinct a) from xxx group by a;

这样就可以达到目的。