Re: Need query - Mailing list pgsql-general

From David G Johnston
Subject Re: Need query
Date
Msg-id 1397237950480-5799694.post@n5.nabble.com
Whole thread Raw
In response to Need query  (Gaurav Jindal <gaurjin@gmail.com>)
List pgsql-general
Gaurav Jindal wrote
> a has relation with b and b has relation with c

Given this statement what specifically are you having difficulty with.  You
are allowed to perform multiple joins, whether explicit or via FROM/WHERE,
in the same query.

SELECT ...
FROM a,b,c
WHERE a=b and b=c

OR

SELECT ...
FROM c
JOIN b on c=b
JOIN a ON b=a

David J.





--
View this message in context: http://postgresql.1045698.n5.nabble.com/Need-query-tp5799681p5799694.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: Re: efficient way to do "fuzzy" join
Next
From: Susan Cassidy
Date:
Subject: Problem with query