Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Get the middle part of a result set
Hi,
I have to following problem:
I get X rows from a statement, these are sorted by a certain column,
let's say an numerical value.
Now I want to calculate the average of this numerical value, but the 10%
with the lowest and the 10% with the highest value shall not be included
in this calculation.
So for example, if I get 20 rows, I need the average of the value in
rows 3 to 18.
Currently I solved this with a very complicated statement, but I don't know the built-in Oracle mathematical functions so I hope that there could be a way to do this with a better performance.
Thanks for any hints,
Jens Received on Tue Dec 18 2007 - 02:17:49 CST
![]() |
![]() |