select  top  5
(select abs(convert(int,sum(smPrice))) from osShipMOney d where d.sucode=a.sucode and smtype=2) smPrice
 from  表1 where id not in ( selet top  5 ...求后半段代码,让里面也根据 order by  smPrice desc 排序)
 order by  smPrice desc 
---说明:suCode肯能有多个 需要统计之后再排序,如何把下面这句套用到后半段,并且返回的是osshipuser 的id呢?
osShipMoney sucode 与 osshipuser对应 关系(多对1)  即osShipMoney 中sucode多个相同的suCode对应 osshipuser中的一个
suCode

select abs(convert(int,sum(smPrice))) from osShipMOney  where suCode in('CNG00001','CNG00005')  
group by(suCode) order by (sum(smPrice))
--osShipMOney 表结构
'CNG0001'  99880
'CNG0005'  93993
'CNG0001'  11880