I have this query which returns the following sample data:RC4 RC_DESC4 EMPLOYEE_ID Product UserID Version WorkstationIDB1A0 EB NE T82284 Win XP Pro t382284 SP3 PLYPGP68SD2DB1A1 EB NE T017261 Win XP Pro t017261 SP3 ISGSAPB_2SSV392B1A1 EB NE T508214 Win XP Pro t508214 SP3 SAPBDYFCXH2DB1A1 EB NE T508214 Win XP Pro t508214 SP3 SAPB2J04X82DB1A2 CNTRL T542819 Win XP Pro t542819 SP2 WISA013GLRNC2T
The query is here:SELECT --V.Product E.RC4, E.RC_DESC4--, Count(E.RC4) CountOfRC4, E.EMPLOYEE_ID, V.Product, V.UserID, V.Version, V.WorkstationIDFROM v_ValidOperatingSystemsInstallations VLEFT JOIN ERS_ePeople E ON V.UserID = E.EMPLOYEE_IDWHERE RC4 is not null--GROUP BY RC4, RC_DESC4ORDER BY RC4, RC_DESC4
Then, I group it here to show just RC4, RC_DESC4, and Count of RC4:SELECT --V.Product E.RC4, E.RC_DESC4, Count(E.RC4) CountOfRC4FROM v_ValidOperatingSystemsInstallations VLEFT JOIN ERS_ePeople E ON V.UserID = E.EMPLOYEE_IDWHERE RC4 is not nullGROUP BY RC4, RC_DESC4ORDER BY RC4, RC_DESC4
Looking at the data line for that is:RC4 RC_DESC4 CountOfRC4B1A0 EB NE 1B1A1 EB NE 3B1A2 CNTRL 1
If you notice, the EmployeeID T508214 occurs on 2 rows. In my summary data, I only want to count it once. So there would be only 2 in the grouped data instead of 3 for that RC4 (B1A1).How would I change the above group by query to count employees only once. We need a head count.Thank you for any help.Duane