You are viewing a single comment's thread. Return to all comments →
MS SQL Server:
with abc as (select name,(months*salary) as earnings from employee),
def as (select earnings,count(name) as names from abc group by earnings)
select top 1 * from def order by earnings desc
Seems like cookies are disabled on this browser, please enable them to open this website
Top Earners
You are viewing a single comment's thread. Return to all comments →
MS SQL Server:
with abc as (select name,(months*salary) as earnings from employee),
def as (select earnings,count(name) as names from abc group by earnings)
select top 1 * from def order by earnings desc