日期:2014-05-17 浏览次数:20576 次
;with t
as
(
select 3800 as amount,3 as num1,800 price1,2 as num2,300 price2
)
select *,
(3800 - (num1*price1+num2*price2)) *1.0/ (num1+num2) + price1 '电脑售价',
(3800 - (num1*price1+num2*price2)) *1.0/ (num1+num2) + price2 '手机售价'
from t