> SELECT foo
> FROM bar b
> LEFT JOIN chair c USING (thekeycol)
> WHERE ...
> :-)
Sub-selects are much nicer:
SELECT foo , bar , (SELECT anotherfoo FROM tab2 WHERE tab2.col = tab1.col) FROM
tab JOIN yet_another_table AS yat ON (yat.c = tab.c)
LEFT JOIN tab1 USING (anothercol) WHERE stuff IS TRUE AND ( optional IS NULL OR optional > 5) HAVING
count(*)> (SELECT total FROM total_table)ORDER BY fooGROUP BY foo , bar , 3;
--
Rod Taylor <rbt@rbt.ca>
PGP Key: http://www.rbt.ca/rbtpub.asc