有测试是对的Select uid from table Group by uid order by sum(num*price)
select uid from(select uid,num * price as zj from table) a1group by uid order by sum(zj)