Top Earners

  • + 0 comments

    ;With CTE (employee_id,Earning) As (SELECT employee_id, Salary * Months FROM Employee ) SELECT CAST(Earning as Varchar(100)) + ' ' + CAST(Count(*) as Varchar(10)) FROM CTE WHERE Earning in (SELECT Max(Earning) FROM CTE) GROUP BY Earning;