呃,没有开发版,后面的跟上
蒙一段:
select 单号,sum(case when 结算价 is null then 合同价 else 结算价 end) as 金额 from 报价表 group by 单号