You can try this query
SELECT t1.name,
t2.login AS added_by,
t3.login AS edited_by
FROM table1 t1
INNER JOIN table2 t2
ON(t1.added_by=t2.id)
INNER JOIN table2 t3
ON(t1.edited_by=t3.id)
solved How I can do this query?