Top Earners

Sort by

recency

|

3340 Discussions

|

  • + 0 comments
    WITH A AS
        (SELECT EMPLOYEE_ID ID,SUM(MONTHS * SALARY) TOTAL
         FROM EMPLOYEE
         GROUP BY EMPLOYEE_ID)
    
    SELECT TOTAL,COUNT(*)
    FROM A
    WHERE TOTAL = (SELECT MAX(TOTAL) FROM A)
    GROUP BY TOTAL
    
  • + 0 comments

    select max(months*salary),count(*) from employee where months*salary = (select max(months*salary) from employee);

  • + 1 comment

    SELECT MAX(salary*months)AS MAX_SALARY, COUNT(employee_id) FROM Employee WHERE salary*months = (SELECT MAX(salary*months) FROM Employee);

  • + 0 comments

    SELECT months * salary as earnings , COUNT(*) AS employee_count FROM Employee GROUP BY earnings ORDER BY earnings DESC LIMIT 1 ;

  • + 0 comments

    select concat(max(salary * months)," ", count(*)) from employee where salary*months = (select max(salary * months) from employee);