leave_request tablein my table emp_id column contains duplicate data 3 times. i want to select all the data from the table and the duplicate data to count as once. here i am providing the screenshot of my table structure
You can try below -
select max(id),emp_id, emp_name
from tablename
group by emp_id, emp_name