Загрузка данных


        sum(case
            when account = '48305.1'
             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 = '48305.1'
             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 = '48302.1'
             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 = '48302.1'
             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 = '48304.1'
             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 = '48304.1'
             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),