Top Earners

Sort by

recency

|

3258 Discussions

|

  • + 0 comments

    SELECT MAX(MONTHS * SALARY) AS TOTAL, COUNT(NAME) AS COUNT FROM Employee where MONTHS * SALARY = (SELECT MAX(MONTHS * SALARY) FROM employee)

    (SIMPLE WAY)

  • + 0 comments
    SELECT
        months * salary AS ganhos,
        COUNT(*) AS total
    FROM
        Employee
    GROUP BY
        months * salary
    HAVING
        ganhos = (SELECT MAX(months * salary) FROM Employee)    
    
        
    
  • + 0 comments

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

  • + 0 comments

    SELECT (salary*months) as earnings,count(*) FROM Employee group by earnings order by 1 desc limit 1;

  • + 0 comments

    For MySQL

    SELECT salary*months AS total_earnings, COUNT(*) FROM employee
    GROUP BY 1
    ORDER BY 1 DESC LIMIT 1;