sql - Group by and exclude minimum and maximum from results -
I do not have statistics similar to the following: Is there a way in Oracle that I can not get an average of this data, which does not include the highest and lowest value? I can get the overall average by grouping a After the The easiest way to use analytical functions is by using the minimum and maximum values First gets:.
Date ID amount 10 June 14 978500302 163005350 17 June 14 978500302 159,947,117 24-Jun 14 978500302 159142342 1-Jul-14 978500302 159,623,201 8-Jul-14 978500302 143,066,033 14-Jul-14 978500302 1458522727 15-Jul-14 978500302 148,595,751
based on ID, and then
AVG (amount) . But how can I do this while leaving the minimum and maximum?
Select ID, average (zodiac) from (selection d *, min (amount) (division by id), as minima, max (amount) data as maxa (id Split by) D) D where zodiac & gt; Mena and Zodiac
Comments
Post a Comment