From: | "zxo102 ouyang" <zxo102(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | how to several records with same timestamp into one line? |
Date: | 2008-11-12 10:57:42 |
Message-ID: | 73ccced30811120257i7e0ce250xc6e385fa3a2b6d5b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
The table is defined as
CREATE TABLE record_data
(
rowid serial NOT NULL,
data double precision,
unit character(10),
channel character(20),
create_on timestamp
)
Is that possible? Thanks for your help in advance.
Ouyang
From | Date | Subject | |
---|---|---|---|
Next Message | Thom Brown | 2008-11-12 10:58:01 | Re: SHMMAX and shared_bufffers |
Previous Message | Csaba Együd | 2008-11-12 10:52:36 | Re: How to define automatic filter condition? |