From: ssylla <stefansylla@gmx.de>
To: pgsql-sql@postgresql.org
Subject: select on many-to-many relationship
Date: Tue, 27 Nov 2012 02:13:51 -0800 (PST)
Message-ID: <1354011231922-5733696.post@n5.nabble.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
Dear list,
assuming I have the following n:n relationship:
t1:
id_project
1
2
t2:
id_product
1
2
intermediary table:
t3
id_project|id_product
1|1
1|2
2|1
How can I create an output like this:
id_project|id_product1|id_product2
1|1|2
2|1|NULL
--
View this message in context: http://postgresql.1045698.n5.nabble.com/select-on-many-to-many-relationship-tp5733696.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
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: stefansylla@gmx.de
Subject: Re: select on many-to-many relationship
In-Reply-To: <1354011231922-5733696.post@n5.nabble.com>
* 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