Re: how to several records with same timestamp into one line?

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: how to several records with same timestamp into one line?
Дата
Msg-id 20081112112439.GG13765@a-kretschmer.de
обсуждение исходный текст
Ответ на how to several records with same timestamp into one line?  ("zxo102 ouyang" <zxo102@gmail.com>)
Список pgsql-general
am  Wed, dem 12.11.2008, um 18:57:42 +0800 mailte zxo102 ouyang folgendes:
> Hi everyone,
>      My data with same timestamp "2008-11-12 12:12:12" in postgresql are as
> follows
>
> rowid  data   unit            channel          create_on
> ------------------------------------------------------------------------------
>  1        1.5     MPa          channel1  2008-11-12 12:12:12
>  2        2.5     M3           channel2   2008-11-12 12:12:12
>  3        3.5     M3           channel3   2008-11-12 12:12:12
>  4        4.5     t               channel4   2008-11-12 12:12:12
> ------------------------------------------------------------------------------
>
> I would like to "group" them into one line with SQL like
>
>    1.5     MPa   2.5    M3  3.5  M3   4.5   t   2008-11-12 12:12:12

Maybe you can create a new aggregate, for instance like there:

http://www.zigo.dhs.org/postgresql/#comma_aggregate



Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

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

Предыдущее
От: "zxo102 ouyang"
Дата:
Сообщение: how to "group" several records with same timestamp into one line?
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: how to "group" several records with same timestamp into one line?