X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 566229FA65C for ; Wed, 21 Jun 2006 15:07:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 31303-01 for ; Wed, 21 Jun 2006 15:07:04 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from tomts13-srv.bellnexxia.net (tomts13-srv.bellnexxia.net [209.226.175.34]) by postgresql.org (Postfix) with ESMTP id 680FB9F9CC1 for ; Wed, 21 Jun 2006 15:07:03 -0300 (ADT) Received: from acer.sympatico.ca ([70.49.13.156]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060621180702.LUEO29052.tomts13-srv.bellnexxia.net@acer.sympatico.ca> for ; Wed, 21 Jun 2006 14:07:02 -0400 Message-Id: <5.2.1.1.0.20060621140420.04580180@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Wed, 21 Jun 2006 14:06:55 -0400 To: pgsql-sql@postgresql.org From: Frank Bax Subject: Re: How to get a result in one row In-Reply-To: <20060621150612.GA6246@fedro.lettere.unipd.it> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/240 X-Sequence-Number: 25476 At 11:06 AM 6/21/06, virgi@lettere.unipd.it wrote: >returns: > id | nick >------+------ >22192 | A >22192 | T >(2 rows) > >I'd like to get the result in only one row: > id | nick >------+------ >22192 | A,T This question is in the archives (probably more than once). The answer is... Read the online docs about aggregate functions. There is an example that does (almost) exactly what you are asking.