I am not very good with SQL so I will post the tables I am working with and what I have tried.
Table 1
Installation
id
Table 2 links to 1
Project
id
installationid
name
Table 3 links to 2
Assignment
id
projectid
Table 4 links to 3
AssignmentException
id
assignmentid
type
I am trying to find Project.name where AssignmentException.type > 0 for Installation.id = 12345. The most experience I have is with simple inner joins. The following is my nonworking attempt that fails to take into account Installationid. A short explanation of how your code works would also be greatly appreciated.
select * from (
Assignment INNER JOIN AssignmentException ON Assignment.id = AssignmentException.assignmentID )
INNER JOIN Project ON Assignment.projectid = Project.id
WHERE AssignmentException.type > 0
How about this: