converting a N rows table to a 1 row table ?

Поиск
Список
Период
Сортировка
От Arup Rakshit
Тема converting a N rows table to a 1 row table ?
Дата
Msg-id 1404390613.98056.YahooMailNeo@web193901.mail.sg3.yahoo.com
обсуждение исходный текст
Ответы Re: converting a N rows table to a 1 row table ?  (Pujol Mathieu <mathieu.pujol@realfusio.com>)
Re: converting a N rows table to a 1 row table ?  (Chris Curvey <chris@chriscurvey.com>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: postgresql server version & JDBC driver version
Следующее
От: Pujol Mathieu
Дата:
Сообщение: Re: converting a N rows table to a 1 row table ?