Search Postgresql Archives

Re: converting a N rows table to a 1 row table ?

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

 




Le 03/07/2014 14:30, Arup Rakshit a écrit :
Hi,

One query is producing the below table :-

answer |  count  |  avg
  a1       3         14
  a2       2         10

How to convert this to a single row table ?

count | avg_a1  | avg_a2
  5       14       10
 
Regards,
Arup Rakshit
Hi,
Could you have multiple row with same answer ?
If I understand you one row and N + 1 column where N is the number of answer ?
Regards

  


[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