View Single Post
Join Date: Dec 2008
Posts: 19
Reputation: dfs3000my is an unknown quantity at this point 
Solved Threads: 0
dfs3000my dfs3000my is offline Offline
Newbie Poster

Need help in getting Average using SQL Cross Tab

 
0
  #1
Dec 23rd, 2008
Hi all,

I have managed to get my average using cross tabs but only if I have grouped it by their categories. If I remove the GROUP BY clause, the cross tabbing doesn't seem to work. Can anyone help me? I would need to get something like:-

  1. Year | Month | Benefits Rating | Facilities Rating
  2. -----------------------------------------------------
  3. 2007 | December | 2 | 3
  4. 2008 | November | 3 | 3
  5. 2008 | October | 2 | 1
  6. 2008 | September| 2 | 2

Thanks

p/s: example is shown as an image below.

Click image for larger version

Name:	sql.PNG
Views:	4
Size:	16.7 KB
ID:	8641
Reply With Quote