Below is the MySQL query to fetch duplicate records from a table:
SELECT EmpId, Project, Salary, COUNT(*) FROM EmployeeSalary
GROUP BY EmpId, Project, Salary HAVING COUNT(*) > 1;
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.