pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Bax <fbax@sympatico.ca>
To: pgsql-sql@postgresql.org
Subject: Re: How to get a result in one row
Date: Wed, 21 Jun 2006 14:06:55 -0400
Message-ID: <5.2.1.1.0.20060621140420.04580180@pop6.sympatico.ca> (raw)
In-Reply-To: <20060621150612.GA6246@fedro.lettere.unipd.it>

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.




view thread (4+ messages)  latest in thread

Message-ID: <5.2.1.1.0.20060621140420.04580180@pop6.sympatico.ca>
Permalink:  ../5.2.1.1.0.20060621140420.04580180@pop6.sympatico.ca/
Also on:    postgresql.org/message-id/5.2.1.1.0.20060621140420.04580180@pop6.sympatico.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: fbax@sympatico.ca
  Subject: Re: How to get a result in one row
  In-Reply-To: <5.2.1.1.0.20060621140420.04580180@pop6.sympatico.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox