Help with multiple joins

I have two tables, equipment and users. In the equipment table I have two field, owner and technician which both link to the users table id.

I can get the owner’s name using a single join, but not sure how to get the technician’s name


SELECT *, name, email FROM equipment 
LEFT JOIN users ON equipment.owner = users.id

I’ve tried to use aliases but have had no success.

thanks

Need to see the tables’ detaisl

SELECT equipment.*
     , owner.name AS owner_name
     , owner.email AS owner_email
     , technician.name AS technician_name
     , technician.email AS technician_email
  FROM equipment 
INNER
  JOIN users AS owner
    ON owner.id = equipment.owner 
INNER
  JOIN users AS technician
    ON technician.id = equipment.technician 

:slight_smile:

Thanks r937.

perfect