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
|
3474 Discussions
|
Please Login in order to post a comment
***select months*salary as earning, count(employee_id) from employee group by months*salary order by earning desc limit 1;*
SELECT (salary*months)as earnings,COUNT(*) FROM employee WHERE employee_id IN ( SELECT employee_id FROM employee WHERE months * salary in (SELECT MAX(months * salary) FROM employee ) ) group by salary*months;
SELECT (MONTHS*SALARY),COUNT((MONTHS*SALARY)) FROM EMPLOYEE GROUP BY (MONTHS*SALARY) ORDER BY (MONTHS*SALARY) DESC LIMIT 1 OFFSET 0;