Re: left outer join on more than 2 tables? - Mailing list pgsql-sql

From Richard Broersma
Subject Re: left outer join on more than 2 tables?
Date
Msg-id 396486430906161545u512acc33lbd67f78174434509@mail.gmail.com
Whole thread Raw
In response to Re: left outer join on more than 2 tables?  (Gavin Baumanis <gavinb@eclinic.com.au>)
List pgsql-sql
On Tue, Jun 16, 2009 at 2:39 PM, Gavin Baumanis<gavinb@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


pgsql-sql by date:

Previous
From: "Hall, Crystal M CTR DISA JITC"
Date:
Subject: Re: left outer join on more than 2 tables? (UNCLASSIFIED)
Next
From: Richard Broersma
Date:
Subject: Re: left outer join on more than 2 tables?