Search Postgresql Archives

transpose time-series columnar data

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

 



Hi all,

I got a view that returns values in the following format

timestamp  |   name   |    value
---------------------------------
ts1            name1       value11
ts1            name2       value12
ts1            name3       value13  
ts2            name1       value21
ts2            name2       value22
ts2            name3       value23  
ts3            name1       value31
ts3            name2       value32
ts3            name3       value33  

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

timestamp    |       name1      |        name2       |        name 3
-----------------------------------------------------------------------
ts1                  value11            value12              value13
ts2                  value21            value22              value23
ts3                  value31            value32              value33

Any help would be appreciated

Thanks and sorry for my english

--
Edu

[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