From: Együd Csaba <csegyud@freemail.hu>
To: Tomasz Myrta <jasiek@klaster.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Getting one row for each subquery row...?
Date: Fri, 20 Jun 2003 09:02:58 +0200
Message-ID: <009201c336f9$fdb9ba70$230a0a0a@compaq> (raw)
References: <007901c336ea$9cee0e80$230a0a0a@compaq>
<3EF2A5AE.1030006@klaster.net>
Thank you Tomasz,
this last one seems to be good - with a little change.
select distinct t_stockchanges.productid, t_productgroups.name as pgroup
from t_stockchanges
join t_prod_in_pgr using (productid)
join t_productgroups on (t_productgroups.id=productgroupid);
Thank you again.
By,
-- Csaba
> Sorry, if you want all combination of grups and products, you need to
rewrite
> your query:
>
> select
> t_stockchanges.productid,
> t_productgroups.name as pgroup
> from
> t_stockchanges
> join t_prod_in using (productid)
> join t_productgroups on (id=productgroupid)
>
> or something like this.
>
> Tomasz
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.489 / Virus Database: 288 - Release Date: 2003. 06. 10.
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: csegyud@freemail.hu, jasiek@klaster.net
Subject: Re: Getting one row for each subquery row...?
In-Reply-To: <009201c336f9$fdb9ba70$230a0a0a@compaq>
* 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