This is the code:
create materialized view vw_sof as
select DISTINCT B.S_ID , A.RENEWAL_DATE,B.X_SCF,
case when trunc(B.DFLT_END_DT- B.DFLT_START_DT) + 1 < = 365 THEN 365
ELSE trunc(B.DFLT_END_DT- B.DFLT_START_DT)
END SCF
from VW_RENEWAL_DATE A ,TABLE_CONTRACT B
WHERE B.S_ID = A.S_ID(+)
what changes has to be made in this code ,so that i refreshes for every 5 mins