You are viewing a single comment's thread. Return to all comments →
For more literal code:
select salary*months as earnings, count(*) from employee group by earnings order by earnings desc limit 1;
For more lazy:
select salary*months as earnings, count(*) from employee group by 1 order by 1 desc limit 1
To use WHERE:
select salary*months, count(*) from employee where salary*months = (select max(salary*months) from employee)
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 →
For more literal code:
For more lazy:
To use WHERE: