Everything is very simple: 1) This is a subquery number of subordinates
SELECT COUNT(*) FROM employee_tbl AS w WHERE w.manager_id= m.id
2) To get with the maximum number - sort descending
ORDER BY подзапрос DESC
3) We need the most-most, i.e. one
LIMIT 1
As a result, we obtain:
SELECT FIO_employees FROM employee_tbl AS m ORDER BY (SELECT COUNT(*) FROM employee_tbl AS w WHERE w.manager_id= m.id) DESC LIMIT 1
Table aliases m is a manager, w is an ordinary worker
OPTION No. 2
if you still need to find several managers with the same number of subordinates
1 line - managers
2 line - number of subordinates
last line - maximum number of subordinates
SELECT FIO_employees FROM employee_tbl AS m WHERE (SELECT COUNT(*) FROM employee_tbl AS w WHERE w.manager_id= m.id) = (SELECT COUNT(*) as maxw FROM employee_tbl AS w GROUP BY w.manager_id ORDER BY maxw DESC LIMIT 1)