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
|
3545 Discussions
|
Please Login in order to post a comment
MySQL Code:
Another solution using sub-Query not lisited in discussions
SELECT max(salary*months) as max_salary , count(*) from employee where salary * months = ( SELECT max(salary*months) from employee
)
SELECT concat(max(salary*months),' ',count(*)) from employee group by salary*months order by salary*months desc limit 1;
SELECT (months*salary)as total_sal,count(*)as cnt from employee group by 1 order by 1 desc limit 1