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

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: how to "group" several records with same timestamp into one line?
Дата
Msg-id dcc563d10811140629u62718f02w42fde5176e84f770@mail.gmail.com
обсуждение исходный текст
Ответ на how to "group" several records with same timestamp into one line?  ("zxo102 ouyang" <zxo102@gmail.com>)
Список pgsql-general
On Wed, Nov 12, 2008 at 3:59 AM, zxo102 ouyang <zxo102@gmail.com> wrote:
> 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
>

Lookup the crosstab contrib functions.

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

Предыдущее
От: "Serge Fonville"
Дата:
Сообщение: Re: [JDBC] Re : [pgadmin-support] trouble in installing postgreSQL 8.3
Следующее
От: "Dan Armbrust"
Дата:
Сообщение: Re: vacuum output question