A_MON A_OUT
------ ----------------------
200101 1900000
200102 2000000
200103 1500000
200104 1100000
200105 2100000
200106 1600000
200107 1400000
200108 1700000
200109 1900000
200110 1000000
200111 1700000
200112 1300000
select a_mon, a_out,
sum( a_out ) over ( partition by to_char( to_date( a_mon , 'YYYYMM' ), 'Q' )
order by to_date( a_mon, 'YYYYMM' )
range interval '2' month preceding ) as c1
from a_tb
range interval '2' month preceding ) as c1 <-- 이부분이 무엇을 말하고 있는지 모르겠어요