Hi I need help with this query please.I need to workout the monthly averages for headcount, terminations and transferout, so I wrote this little query which gives me totals but I just can't bring my head around to writing the proper query for the averages. Please help.Select Period,Headcount = SUM(CASE WHEN Headcount ='Headcount' THEN 1 ELSE 0 END),Terminations = SUM(CASE WHEN Headcount = 'Termination' THEN 1 ELSE 0 END),TransferOut = SUM(CASE WHEN Headcount ='TransferCluster' AND Transfertype = 'TransferOut' THEN 1 ELSE 0 END)FROM DTIHeadcount LEFT OUTER JOIN ReportingStructure ON DTIHeadcount.CostCenter = ReportingStructure.CostCenterWhere Period Like '2009%'and Staffno is not nullGroup By Period