select top 4 tid,SUM(alink) as 总销量
from 信息表 a join 类别表 b on a.tid=b.tid
group by tid
order by 2 desc
------解决方案-------------------- select tid,SUM(alink) as 总销量 from 信息表 a join 类别表 b on a.tid=b.tid group by tid order by 2
------解决方案--------------------