SELECT * FROM ( select salary*months as earning, count(salary*months) as counting from Employee GROUP BY earning ) as salary order by earning desc limit 1 처음엔 이렇게 풀었다. 답은 나오지만 더 효율적인 코드는 select salary*months as earning, count(salary*months) from Employee where salary*months=(select max(salary*months) from Employee) group by earning select salary*months as earning, count(salary*months) from Emplo..