aharris88
Programmer
- Dec 12, 2007
- 12
I need to average the top 30% runs for ropers. I have a table full of ropers and a table full of their times. I can join them and get the average of their times easily: avg(a.time) or get the number of runs per person: count(a.time), but how can I average just the top 30% per person?
Also, I know this makes it a lot more complicated, but I need a 0 for that column if any of the times in the top 30% are 0.
Also, I know this makes it a lot more complicated, but I need a 0 for that column if any of the times in the top 30% are 0.