"left join" not working? - Mailing list pgsql-sql

From Louis-David Mitterrand
Subject "left join" not working?
Date
Msg-id 20100212111453.GA16318@apartia.fr
Whole thread Raw
Responses Re: "left join" not working?  (msi77 <msi77@yandex.ru>)
List pgsql-sql
Hi,

This query:

select c.id_currency,max(p.modified_on) from currency c left join
price_line p using (id_currency) where p.id_line=1 group by
c.id_currency;

doesn't list all c.id_currency's, only those with a price_line. However
this one does:

select c.id_currency,max(p.modified_on) from currency c left join
price_line p on (p.id_currency = c.id_currency and p.id_line=1) group by
c.id_currency;

How come?

Thanks,


pgsql-sql by date:

Previous
From: Jasen Betts
Date:
Subject: Re: 'image' table with relationships to different objects
Next
From: "Oliveiros C,"
Date:
Subject: Re: "left join" not working?