Search Postgresql Archives

Re: How to select avg(select max(something) from ...)

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

 



Another variation:

select avg(max) from (select distinct max(val) over(partition by id) from mytable);


Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support


[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux