We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- SQL
- Aggregation
- Top Earners
- Discussions
Top Earners
Top Earners
Sort by
recency
|
3045 Discussions
|
Please Login in order to post a comment
SELECT (MONTHS * SALARY ) AS OVERALL, COUNT(*) FROM EMPLOYEE GROUP BY OVERALL ORDER BY OVERALL DESC LIMIT 1;
select earnings, count(earnings) from (select name, months * salary as earnings from employee) as t group by earnings order by earnings desc limit 1;
select months* salary as earnings , count(*) from employee group by earnings order by earnings desc limit 1;
select top 1 salary*months, count(*) from employee group by salary*months order by salary*months desc; // for ms sql server