https://www.hackerrank.com/challenges/earnings-of-employees/problem?h_r=internal-search
풀이 1. 제일 쉬운(?) 방법
SELECT salary * months AS earnings, COUNT(*)
FROM Employee
GROUP BY earnings
ORDER BY earnings DESC
LIMIT 1
풀이 2. WHERE 절 서브쿼리 활용
SELECT salary * months AS earnings, COUNT(*)
FROM Employee
WHERE salary * months = (SELECT MAX(salary * months) FROM Employee)
GROUP BY earnings
풀이 3. HAVING 절 서브쿼리 활용
SELECT salary * months AS earnings, COUNT(*)
FROM Employee
GROUP BY earnings
HAVING earnings = (SELECT MAX(salary * months) FROM Employee)
서브쿼리 어렵다...ㅠㅠ 흑흑