I am running the query below and want to remove duplicates and then get a count 
of machines by OU.  Any help would be appreciated
select DS.Name0 [Computer Name],
DS.Creation_Date0 [Date], DS.Operating_System_Name_and0 [Operating System], 
OU.System_OU_Name0 [OU Name]
FROM
dbo.System_DISC DS
Inner Join dbo.System_System_OU_Name_ARR OU on OU.ItemKey = DS.ItemKey
WHERE Operating_System_Name_and0 like '%10%' and
DateDiff(dd,Creation_Date0, GetDate ()) <= 1
Group BY Name0, Creation_Date0, Operating_System_Name_and0, System_OU_Name0





Reply via email to