I have 3 tables as such
+----+---------+
| id | message |
+----+---------+
| 1 | sup |
+----+---------+
| 2 | hello |
+--------------+
+------------+----------+
| message_id | comments |
+------------+----------+
| 1 | hi |
+------------+----------+
| 1 | bye |
+------------+----------+
+------------+-------+
| message_id | likes |
+------------+-------+
| 1 | sup |
+------------+-------+
| 2 | hello |
+------------+-------+
And I'm looking for something in the end like this
+----+---------+------------+----------+------------+-------+
| id | message | message_id | comments | message_id | likes |
+----+---------+------------+----------+------------+-------+
| 1 | sup | 1 | hi | null | null |
+----+---------+------------+----------+------------+-------+
| 1 | sup | 1 | bye | null | null |
+----+---------+------------+----------+------------+-------+
| 1 | hello | null | null | 1 | sup |
+----+---------+------------+----------+------------+-------+
| 1 | hello | null | null | 2 | hello |
+----+---------+------------+----------+------------+-------+
I have 2 joins like
select * from message join comments on id = comments.message_id join likes on id = likes.message_id
But this is returning all the fields populated. I want the fields to be not be populated where they do not exist. Is this possible?
EDIT: To address peoples comments
mysql> select * from message join comments on id = comments.message_id join likes on id = likes.message_id;
+----+---------+------------+----------------------+------------+-----------+
| id | message | message_id | comment | message_id | comment |
+----+---------+------------+----------------------+------------+-----------+
| 1 | hello | 1 | hello | 1 | what |
| 1 | hello | 1 | hello | 1 | what what |
| 2 | two | 2 | bye | 2 | what ok |
| 1 | hello | 1 | hello what what | 1 | what |
| 1 | hello | 1 | hello what what | 1 | what what |
| 1 | hello | 1 | hello what what what | 1 | what |
| 1 | hello | 1 | hello what what what | 1 | what what |
+----+---------+------------+----------------------+------------+-----------+
mysql> select * from message left join comments on id = comments.message_id left join likes on id = likes.message_id;
+----+---------+------------+----------------------+------------+-----------+
| id | message | message_id | comment | message_id | comment |
+----+---------+------------+----------------------+------------+-----------+
| 1 | hello | 1 | hello | 1 | what |
| 1 | hello | 1 | hello what what | 1 | what |
| 1 | hello | 1 | hello what what what | 1 | what |
| 1 | hello | 1 | hello | 1 | what what |
| 1 | hello | 1 | hello what what | 1 | what what |
| 1 | hello | 1 | hello what what what | 1 | what what |
| 2 | two | 2 | bye | 2 | what ok |
+----+---------+------------+----------------------+------------+-----------+
I agree that likes should be an integer but this data is a mock data for something I just made up.