select top 10 username,Score,(select count(*) from ks_iteminfo where inputer=a.username) as num from ks_user a where a.groupid=用户组ID order by 3 desc,userid
s elect top 10 username,Score,(s elect count(*) from ks_iteminfo where inputer=a.username and Year(AddDate)=Year(now())) as num from ks_user a where a.groupid=用户组ID order by 3 desc,userid