from (
select *,(round((Period-1)/3,0)+1) as quarter
from fiscalperiod where Fyear = '20112012' ) a
group by fyear, quarter
select fyear,(round((Period-1)/3,0)+1) as quarter, min(startdt) startt, max(enddt)endt
from fiscalperiod where Fyear = '20112012'
group by fyear,(round((Period-1)/3,0)+1)
No comments:
Post a Comment