Top Earners

Sort by

recency

|

3232 Discussions

|

  • + 0 comments

    SELECT MAX(Salary*Months), COUNT(*) FROM employee GROUP BY Salary*Months ORDER BY max(Salary*Months)desc LIMIT 1;

  • + 0 comments

    worked for me: select salary * months as total , count(*) from employee group by total order by total desc limit 1;

  • + 0 comments

    SELECT Salary*Months, COUNT(*) FROM employee WHERE Salary*Months IN (SELECT MAX(Salary*Months) FROM employee) GROUP BY Salary*Months

  • + 0 comments

    select months*salary, count(*) from Employee group by months*salary order by months*salary desc limit 1;

  • + 0 comments

    This worked fine for me: SET @earnings = (SELECT MAX(salary * months) FROM employee); SELECT @earnings AS max_earnings, COUNT(*) FROM employee WHERE salary * months = @earnings;