我有一个mysql表聊天,比如
+---------+-----------+-------------+----------------+
| chat_id | sender_id | receiver_id | msg |
+---------+-----------+-------------+----------------+
| 1 | 1002 | 1001 | test |
| 2 | 1001 | 1002 | test |
| 3 | 1002 | 1001 | test |
| 5 | 1001 | 1002 | asdf |
| 6 | 1003 | 1001 | tesdf |
| 9 | 1001 | 1003 | tasdfa a fasd |
| 10 | 1001 | 1004 | dsf asdf a |
| 11 | 1005 | 1001 | dsf asdf asdf |
+---------+-----------+-------------+----------------+
用户1002,1003,1004,1005之间有用户1001的会话
我需要与用户 1001 进行对话的用户列表(1002,1003,1004,1005)。
什么是mysql查询?请帮我。