Floodster
Technical User
- Jan 28, 2005
- 204
Hi,
My scenario is that I have a table like below
Name | Game1 | Game2 | Game3 | Game4 | Game 5
A | 20 | 25 | 35 | 12 | 40
What I want to be able to do is work out the average based on the best 3 scoring games? The other problem is that there may be cases where not everyone has played 3 games.
So I would expect my query to only select Game2, Game3 & Game4 & then work out the average which would be 33.3.
Thing is I don't know how to do this, can anyone out there help??
I know it's late on Friday & England are playing tomorrow but I've been struggling for most of the day with this!!
Thanks,
My scenario is that I have a table like below
Name | Game1 | Game2 | Game3 | Game4 | Game 5
A | 20 | 25 | 35 | 12 | 40
What I want to be able to do is work out the average based on the best 3 scoring games? The other problem is that there may be cases where not everyone has played 3 games.
So I would expect my query to only select Game2, Game3 & Game4 & then work out the average which would be 33.3.
Thing is I don't know how to do this, can anyone out there help??
I know it's late on Friday & England are playing tomorrow but I've been struggling for most of the day with this!!
Thanks,