I have situation where I have 3 stores and we want the total count of employees in the in each store for each month; for 4 months. Then would take these totals add them up and devide by the 6 months to get an average.
Exp:
Jan Feb March Apr May
store1 2 3 1 2
Store2 1 2 1 3
Store3 3 1 2 1
-- -- -- --
6 6 4 6 <-- does not have to be shown
4 month average 5.5 This does have to be shown
Cannot figure out the SQL to do this, any ideas would be appreciated.
Thank you