Niels
Thanks for the quick response
however

       http://en.wikipedia.org/wiki/Median

and quote:
"If there is an even number of observations, then there is no single middle value; the median is then usually defined
to be the mean of the two middle values [1] [2] (the median of {3, 5, 7, 9} is (5 + 7) / 2 = 6)...."
so by this definition median of {1,2} should return 1.5
running this in Oracle, MSExcel, etc. i get 1.5 as well

if i miss something, or the definition of the Median is different in MonetDB - please let me know
thanks in advance
milan


On 21. 9. 2014 21:22, Niels Nes wrote:
On Sun, Sep 21, 2014 at 08:33:08PM +0200, Budulinku Dejmihrasku wrote:
Hi,
just a quick question regarding to MEDIAN:

    with x as (select 1.0 as a union all select 2.0 as a)
    select sys.median(a) as result
    from x

returns  result=1
i would expect result=1.5 though
1.5 is not a value in the input. Median should always return a value from
the input. 

Niels
any suggestion?
thanks
milan

      
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list



_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list