Search Postgresql Archives

Re: complex custom aggregate function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: RE: complex custom aggregate function

Oops,

I meant

group by floor(h_q-x)
instead of
group by (h_q-x)/1

Marc Mamin


> select H,A
> FROM
> (
> select  min(h_q) as H, avg(x) as A
> group by h_q/1
> union all
> select  min(h_q), avg(x)
> group by (h_q-0.25)/1
> union all
> select  min(h_q), avg(x)
> group by (h_q-0.50)/1
> union all
> select  min(h_q), avg(x)
> group by (h_q-0.75)/1
> )foo
> where A= select max(A) from (foo..)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux