You can change the "ORDER BY emp_date" in the query below to change which of the many records you want to pick. It will pick the first one based on the order by clauseSELECT * FROM( select DISTINCT EMP_NUMBER emp_date, join_date ,estimated_date, create_date,current_flag ,ROW_NUMBER() OVER (PARTITION BY EMP_NUMBER ORDER BY emp_date) AS RN from EMP WHERE DATEDIFF(YEAR,person_date_of_birth,join_DATE) >=65) s WHERE RN = 1;