mysql
select company_name, count(employee_name) employee_count
from works
group by company_name
order by count(employee_name) desc limit 1,1
sql server
select top 1 company_name, count(employee_name) employee_count
from works
group by company_name
order by count(employee_name) desc
select max(employee_count) from (
select count(employee_name) employee_count from employee e,works w,company c where e.employee_name=w.employee_name and w.company_name=c.company_name group by company_name ) t
--把雇员最多的公司排序
select
*
from company as a
order by (select count(1) from works where company_name=a.company_name) desc
问题好像不太明朗