Mysql
 sql >> Database >  >> RDS >> Mysql

unendo due volte la stessa tabella su colonne diverse

SELECT 
     complaint.complaint_text, 
     A.username, 
     B.username
FROM 
     complaint 
     LEFT JOIN user A ON A.user_id=complaint.opened_by 
     LEFT JOIN user B ON B.user_id=complaint.closed_by