¡¼insert into insert into TVolumeSum (FType, FYear, FMonth, FLevel, FPoint, FCount) select 'VP', year(period_end) f1, month(period_end) f2, paid_lev f3, amt_purc f4, count(*) f5 from pvolume where country='TAI' group by year(period_end), month(period_end), paid_lev, amt_purc ¡¼insert into and union insert into TVolumeSum (FType, FYear, FMonth, FLevel, FPoint, FCount) select 'R1', FYear f1, FMonth f2, '04', 1, sum(FCount) f5 from TVolumeSum where FType='VP' and FLevel <='04' and (FPoint >0 and FPoint <35) group by FYear, FMonth union select 'R1', FYear f1, FMonth f2, '04', FPoint f4, sum(FCount) f5 from TVolumeSum where FType='VP' and FLevel <='04' and (FPoint >=35 and FPoint <=60) group by FYear, FMonth, FPoint union select 'R1', FYear f1, FMonth f2, '04', 61, sum(FCount) f5 from TVolumeSum where FType='VP' and FLevel <='04' and (FPoint >60) group by FYear, FMonth union select 'R1', FYear f1, FMonth f2, '05', 1, sum(FCount) f5 from TVolumeSum where FType='VP' and FLevel >'04' and (FPoint >0 and FPoint <55) group by FYear, FMonth union select 'R1', FYear f1, FMonth f2, '05', FPoint f4, sum(FCount) f5 from TVolumeSum where FType='VP' and FLevel >'04' and (FPoint >=55 and FPoint <=70) group by FYear, FMonth, FPoint union select 'R1', FYear f1, FMonth f2, '05', 71, sum(FCount) f5 from TVolumeSum where FType='VP' and FLevel >'04' and FPoint >70 group by FYear, FMonth