Re: [SQL] Re: multi-table join, final table is outer join count ...

2001-05-12 Thread Tom Lane
The Hermit Hacker <[EMAIL PROTECTED]> writes: > SELECT distinct s.gid, s.created, count(i.title) AS images > FROM status s LEFT JOIN images i ON (s.gid = i.gid AND i.active), > personal_data pd, relationship_wanted rw >WHERE s.active AND s.status != 0 > AND (s.gid = pd.gid

[SQL] Re: multi-table join, final table is outer join count ...

2001-05-12 Thread The Hermit Hacker
Got it after a bit of fiddling ... actually, not bad code ... SELECT distinct s.gid, s.created, count(i.title) AS images FROM status s LEFT JOIN images i ON (s.gid = i.gid AND i.active), personal_data pd, relationship_wanted rw WHERE s.active AND s.status != 0 AND (s.gid =