多谢Neeo童鞋提供

select count(1) as Count ,UserName 
from [User]
group by UserName 
order by Count desc