Although SOQL doesn’t allow arbitrary joins, it provides some control over how related objects are navigated. This section discusses inner and outer joins, as well as semi-joins and anti-joins:
Inner join and outer join—SOQL statements that include related objects normally do so by outer join, but can perform an inner join instead using a
Semi-join and anti-join—Semi-join and anti-join are types of relationship queries that use the results of a subquery to filter the records returned from the parent object. ...