Re: [GENERAL] Left join help - Mailing list pgsql-general

From Arup Rakshit
Subject Re: [GENERAL] Left join help
Date
Msg-id 65DEB24C-3F35-411F-872A-FEDD856FB262@outlook.com
Whole thread Raw
In response to Re: [GENERAL] Left join help  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: [GENERAL] Left join help  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
Hi David,

Can you tell me how can I add ordering between LEFT and INNER JOIN. I think also that is where I am wrong, but not sure how to correct the ordering.

Thanks,
A


On Jun 24, 2017, at 3:18 AM, David G. Johnston <david.g.johnston@gmail.com> wrote:

On Friday, June 23, 2017, Arup Rakshit <aruprakshit1987@outlook.com> wrote:
FROM "missions" LEFT JOIN submissions ON submissions.mission_id = missions.id
INNER JOIN members ON members.id = submissions.member_id

Quick look here but having submissions as part of the inner join with members defeats the attempt at left joining it with missions.  You might need to add parentheses to put the joins in the correct order, or something.  Why it gives zero results we cannot say without a self-contained example.

David J.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] Left join help
Next
From: Paul Jungwirth
Date:
Subject: Re: [GENERAL] Left join help