oracle: is there a way to optimize the query if we are using the ROUND function 100 times in a single query?


The next query is to compare the last day of the month and select zero or a value.
I am not pasting the entoie query as it is huge and I am just stating the condition which, if possible, can be optimized.

ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,0)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,0)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M

ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,1)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,1)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M

ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,2)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,2)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M

ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,3)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,3)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M
ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,4)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,4)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M
ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,5)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,5)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M   
ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,6)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,6)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M
ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,7)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,7)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M    
ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,8)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,8)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M   
ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,9)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,9)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M    
ROUND(sum(case when LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,10)) >= M_F_CCFRMCD1 and 
LAST_DAY(ADD_MONTHS(TD.M_H_REP_DATE,10)) < M_F_CCFRMCD2 then GAP.M_F_CCNOM else 0 end )) as 
M_1M

The previous line is repeated 40 times, since we have to add 34 months.
but the result is the same for all conditions, either GAP.M_F_CCNOM or O.

Is there a way to optimize the previous query?
I am new to sql and could only manage the above query.

Thank you

``