Search Postgresql Archives

Re: transpose time-series columnar data

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

 



On Tue, Aug 17, 2021 at 11:29 AM Edu Gargiulo <egargiulo@xxxxxxxxx> wrote:

I need to transpose and return one row for a single timestamp and one column for every name (fixed number of names), something like this


https://www.postgresql.org/docs/current/tablefunc.html

or

select ..., max(value) filter (where name = 'name1') as name1, max(value) filter (where name = 'name2') as name2, etc from tbl group by ...

David J.


[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