From: Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>
To: pgsql-sql@postgresql.org
Subject: join with an array
Date: Wed, 24 Feb 2010 13:40:23 +0100
Message-ID: <20100224124023.GA16500@apartia.fr> (raw)
Hi,
I'm trying the following query:
select array_agg(t1.id) from table1 t1 join table2 t2 on (t2.id = any(array_agg)) group by t1.col1;
but I get this error: ERROR: column "array_agg" does not exist
I tried aliasing array_agg(t1.id) without success.
Thanks for any suggestions,
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: vindex+lists-pgsql-sql@apartia.org
Subject: Re: join with an array
In-Reply-To: <20100224124023.GA16500@apartia.fr>
* 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