如何获取表中的所有数据,如果在一列中重复相同的值,该行应该计数一次?

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