sum(case
when account = '48310'
and contract_class_code = 'INS'
and contract_model_label = 'VFA'
and (sum_dt_bu is not null or sum_ct_bu is not null)
then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
end),
sum(case
when account = '48310'
and contract_class_code = 'INS'
and contract_model_label = 'BBA'
and (sum_dt_bu is not null or sum_ct_bu is not null)
then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
end),
sum(case
when account = '48310'
and contract_class_code = 'INV'
and (sum_dt_bu is not null or sum_ct_bu is not null)
then abs(coalesce(sum_dt_bu, 0) - coalesce(sum_ct_bu, 0))
end)