"select c1, method(c2) group by c1" returns all values of c2 for c1

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: "select c1, method(c2) group by c1" returns all values of c2 for c1
Date: 2011-02-08 19:35:38
Message-ID: 4D519B0A.9040708@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Good afternoon,

Is there a method to retrieve the following results:

T1(c1 int, c2 varchar(128) )
---------------------------------

(1, val1);
(1, val2);
(1, val3);
(2, val1);
(3, val5);
(3, val6);

select c1, method(c2)
group by c1

returns:
============
1, "val1, val2, val3"
2, "val1"
3, "val5, val6"

Thanks a lot!

--
Lu Ying

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2011-02-08 19:43:19 Re: "select c1, method(c2) group by c1" returns all values of c2 for c1
Previous Message Tarlika Elisabeth Schmitz 2011-02-08 19:27:23 Re: data import: 12-hour time w/o AM/PM