SyntaxFix
Write A Post
Hire A Developer
Questions
select * from emp e where 3>=(select count(distinct salary) from emp where s.salary<=salary)
This query selects the maximum three salaries. If two emp get the same salary this does not affect the query.