select * from uTable
order by month(datefiled) % 4
select month(datefiled) % 4 as theM, sum(f1) from uTable
group by month(datefiled) % 4
order by month(datefiled) % 4
select month(datefiled) % 4 as theM, sum(f1) from uTable
group by month(datefiled) % 4
group by (case when month(f_date)<4 then 1 end
case when (month(f_date)>3 and month(f_date)<7) then 2 end
case when (month(f_date)>7 and month(f_date)>10) then 3 end
case when month(f_date)>9 then 4 end)