Contents

Top Earners

   Mar 17, 2023     0 min read

Top Earners

문제

Top_Earners1.jpg
Top_Earners2.jpg
Top_Earners3.jpg

코드

Oracle

SELECT MONTHS * SALARY
     , COUNT(*)
FROM EMPLOYEE
WHERE MONTHS * SALARY = ( SELECT MAX(MONTHS*SALARY)
                          FROM EMPLOYEE )
GROUP BY MONTHS * SALARY;
SELECT MONTHS * SALARY
     , COUNT(*)
FROM EMPLOYEE
GROUP BY MONTHS * SALARY
HAVING MONTHS * SALARY = ( SELECT MAX(MONTHS*SALARY)
                           FROM EMPLOYEE);