Вот два варианта, сами смотрите какой вам больше подходит. Они отличаются по скорости, надежности и обработке целостности. Обычно нужен второй вариант.
select * from staff;
+------+-------+
| id | name |
+------+-------+
| 1 | name1 |
| 2 | name2 |
| 3 | name3 |
+------+-------+select * from deals;
+----------+----------+
| customer | executor |
+----------+----------+
| 1 | 2 |
| 1 | 3 |
| 2 | 3 |
| 2 | 4 |
+----------+----------+
1. Неявный join:
select s1.name, s2.name from deals as d, staff as s1, staff as s2 where d.customer=s1.id and d.executor=s2.id;
+-------+-------+
| name | name |
+-------+-------+
| name1 | name2 |
| name1 | name3 |
| name2 | name3 |
+-------+-------+
2. Явный left join
select s1.name, s2.name from deals as d left join staff as s1 on(d.customer=s1.id) left join staff as s2 on (d.executor=s2.id);
+-------+-------+
| name | name |
+-------+-------+
| name1 | name2 |
| name1 | name3 |
| name2 | name3 |
| name2 | NULL |
+-------+-------+