I am using a nested SQL query for finding the third lowest salary but the query doesn't show the correct name of the employee instead it shows gives the highest-paid employee name with the third-lowest salary. This is my query.
SELECT first_name, MIN(salary)
FROM employee
WHERE salary > (SELECT min(salary)
FROM employee
WHERE salary > (SELECT min(salary)
FROM employee)
);
question from:https://stackoverflow.com/questions/65928719/trying-to-find-third-lowest-salary-in-mysql