For at få hele rækken indeholdende den maksimale værdi kan du bruge ORDER BY ... DESC LIMIT 1
i stedet for MAX
:
SELECT company_name, cnt
FROM (
SELECT company_name, count(employee_name) AS cnt
FROM works
GROUP BY company_name
) w1
ORDER BY cnt DESC
LIMIT 1