3 ms·
On the first and fourth queries you don't need LEFT JOIN because the WHERE clause guarantees that only INNER JOIN rows will match. (Presumably neither question
by genwin 13y ago
On the first and fourth queries you don't need LEFT JOIN because the WHERE clause guarantees that only INNER JOIN rows will match. (Presumably neither question applies to the top person.)
On the third one you don't list all departments; the empty ones are filtered out. Needs a LEFT JOIN.