SELECT (select id from eroad_role where code='R004'), users.id
FROM res_users users
WHERE employee_id IN
(select hr_employee.id
from hr_employee
left join hr_department on hr_employee.department_id = hr_department.id
where hr_department.department_code in ('D20210720061','D20210412048'))
SELECT (select id from eroad_role where code='R004'), users.id
FROM res_users users
WHERE employee_id IN
(select hr_employee.id
from hr_employee
left join hr_department on hr_employee.department_id = hr_department.id
where hr_department.department_code in ('D20210720061','D20210412048'))