1\列出不重复的个数:select bb.* from (select username,count(*) as cnumber from tjip group by username) as bb order by bb.cnumber desc,bb.username
2\列出个数并求和:select bb.* from (select username,sum(qian) as cnumber from tjip group by username) as bb order by bb.cnumber desc,bb.username