${IF(databaseId='M',"SELECT " + bgnPlanYear + " + help_topic_id AS eval_year FROM TAB_HELP_TOPIC WHERE help_topic_id < " + endPlanYear + "-" + bgnPlanYear + " + 1" ,"select "+(bgnPlanYear-1)+"+level as eval_yearfrom dualconnect by "+(bgnPlanYear-1)+"+level <="+endPlanYear)}SELECT sum(capD) as capD,SUM(costD) as costD,plan_year as year,specSort from (select * from VM_PB_PLAN) a where 1=1GROUP BY specSort,plan_year