Re: Left join help

From: Arup Rakshit <aruprakshit1987(at)outlook(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Left join help
Date: 2017-06-23 22:17:59
Message-ID: 65DEB24C-3F35-411F-872A-FEDD856FB262@outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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(dot)g(dot)johnston(at)gmail(dot)com<mailto:david(dot)g(dot)johnston(at)gmail(dot)com>> wrote:

On Friday, June 23, 2017, Arup Rakshit <aruprakshit1987(at)outlook(dot)com<mailto:aruprakshit1987(at)outlook(dot)com>> wrote:
FROM "missions" LEFT JOIN submissions ON submissions.mission_id = missions.id<http://missions.id/>
INNER JOIN members ON members.id<http://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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Jungwirth 2017-06-23 22:18:30 Re: Left join help
Previous Message David G. Johnston 2017-06-23 21:48:38 Re: Left join help