Affine Analytics Interview Questions | How to get 3 Min salaries? Question 3 Minimum salaries in progress 0 SQL TheDataMonk 55 years 3 Answers 1245 views Grand Master 0
Answers ( 3 )
select distinct(salary) from salary_details order by salary asc limit 3
SELECT DISTINCT salary
FROM employees a
WHERE 3 >= (SELECT COUNT(DISTINCT salary)
FROM employees b
WHERE b.salary <= a.salary)
ORDER BY a.salary DESC;
select DISTINCT (salary)
from Table
ORDER BY salary ASC
LIMIT 3;