SQL: Join on multiple tables
You need to look into the different JOIN types.

With an INNER JOIN as you have here the result will only include rows for cases where a match is found in all the sources.

With a LEFT OUTER JOIN or RIGHT OUTER JOIN the result will include rows for all data in one side of the join even if there is no match at the other side (columns SELECTed from the other side will come out as NULL).

With a FULL OUTER JOIN you will get rows output for all three conditions (match both sides, data on left with no match on right, and data on right with no match on left). I think this is what you want for the join between contacts and users.

Note that the word "outer" is usually optional so you could write LEFT JOIN instead of LEFT OUTER JOIN



This page has a useful diagram of join types: http://stevestedman.com/2015/03/mysql-join-types-poster/

It suggests that mySQL doesn't support FULL OUTER joins (which I didn't know was the case) so you will need to UNION two selects, one with a RIGHT join and one with a LEFT to get the sort of result you are looking for.