I am trying to calculate some monthly totals and then use those totals in another column. Something like this:
select sum(jan+feb+mar) as qtr1, sum(apr+may+jun) as qtr2, sum(qtr1+qtr2) as first6months from myTable
Do I need to do this in a subquery or is there some way to use an alias to refer to the calculated qtr amounts?
Kind Regards,
Mat