On Tue, Jun 16, 2009 at 2:39 PM, Gavin Baumanis<gav...@eclinic.com.au> wrote:
> At the risk of being wrong.... (I'm always ready to learn something new) -
> and seemingly I'm only too happy to be wrong!...
>
> And... it might even be that it is exactly the same result - but I would
> have proposed;
>
> SELECT
>    R.region_name,
>    Count(*) AS RegionComplaints
> FROM
>    Region AS R
>        LEFT JOIN City AS Ci
>            LEFT JOIN Complaint AS Cm ON Ci.id = Cm.city_id
>      ON R.id = C.region_id
> GROUP BY
>    R.region_name;

Yup, it produces the same result.


-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to