database schema looks like
employee (employee_name, street, city)
work (employee_name, company_name, salary)
The company (company_name, city)
manages (employee_name, manager_name)
it is required to fulfill the request: to
find the company with the most employees.
I could find out the maximum score by request:
SELECT max( cnt ) max_cnt
FROM (
SELECT count( employee_name ) cnt, company_name
FROM works
GROUP BY company_name
)w1;
But now I canโt find out the name of the company. If anyone has any idea, please share.
source
share