Question: Name the query allocation of resources, consultant name
Crm resource table
Resource id, assigned person id, id consultant
User table user
User id, the user name
Solution:
SELECT crm.id, user1.name, user2.name FROM crm LEFT JOIN user1 ON crm.blind_id = user1.id LEFT JOIN user2 ON crm.work_id = user2.id