How to find maximum avg

前端 未结 15 2248
长情又很酷
长情又很酷 2020-12-15 19:17

I am trying to display the maximum average salary; however, I can\'t seem to get it to work.

I can get a list of the average salaries to display with:



        
15条回答
  •  别那么骄傲
    2020-12-15 20:08

    You should try the following approach:

    select avg(salary) as max_avg_salary from Salaries group by emp_no order by avg(salary) desc limit 1;
    

提交回复
热议问题