Re: Join question

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>, tyrrill_ed(at)emc(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: Join question
Date: 2007-08-21 19:18:52
Message-ID: 663038.58978.qm@web31802.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

oops...

I meant "DISTINCT ON ( a_id )"

--- Richard Broersma Jr <rabroersma(at)yahoo(dot)com> wrote:
> SELECT a.x, b.x
> FROM ( SELECT DISTINCT ON ( a_id ) a_id, b_id
^^

> FROM c ) AS c( a_id, b_id )
> INNER JOIN a
> ON c.a_id = a.id
> INNER JOIN b
> ON c.b_id = b.id;
>
> Regards,
> Richard Broersma Jr.
>
>
>
>

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2007-08-21 19:34:27 SELECT syntax synopsis: column_definition?
Previous Message Richard Broersma Jr 2007-08-21 19:16:40 Re: Join question