If we assume you only have two employeeID's and the last entry is a typo..
Simply get a distinct list before you calculate totals.
SELECT center_ID, unit, count(EmployeeID) cnt, sum(hours_Studied) sumHrs
FROM (SELECT distinct Center_ID, Unit, EmployeeID, hours_Studied
FROM test_data) TD
GROUP BY CENTER_ID, unit
Giving us: I234, 4, 2, 10
or using an analytic: though I'm not sure how to handle what hours_studied to sum if they very by employeeID... so the ordering may be incorrect.
SELECT Center_ID, Unit, count(Distinct EmployeeID) cnt_Dist_Emp , sum(Hours_Studied) sum_hrs
FROM (Select row_number() over (PARTITION BY center_ID, unit, employeeID, Hours_Studied order by center_ID, unit, employeeID, Hours_Studied ) rn, TD.*
FROM Test_data td)
WHERE RN = 1
GROUP BY Center_ID, Unit
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…