select ht_MaiF2,sum(ht_HTmoney) as '总金额' from tb_ht where ht_ISemergency='否' group by ht_maif2select ht_MaiF2,(sum(ht_HTmoney)-sum(cast(ht_fk as decimal(18,2)))) as '未付款金额', count(ht_id) as '合同数',sum(ht_htmoney) as '总金额', sum(cast(ht_fk as decimal(18,2))) as & Read More