I have been facing this requirement more often nowadays but don't how to write it efficiently.
an example :
Need to find employees from companies with at least 5 managers 3 admin 2 clerks(total 10 roles) and their details
EMP table:
Comp_Id, Emp_id, Emp_name, Emp_role
Company :
Comp_Id, Comp_Name
-- I've tried to search for any existing similar questions. couldn't find anything relevant.