RT

解决方案 »

  1.   

           count(prd_inst_id) as new_inc,
           count(case
                   when YEAR_FLAG <> '0000' then
                    prd_inst_id
                   else
                    null
                 end) as new_inc_pre,这个是查出的月数据
      

  2.   

    sum(new_inc_pre
           count(case
                   when YEAR_FLAG <> '0000' then
                    prd_inst_id
                   else
                    null
                 end))  as y_new_inc_pre
    报错:嵌套的太深