return the first instance of EventTime for IdNumber.assuming you want it for a group of id thisSELECT [Id], [EventTime], [Location], [Event], [Details], [Dept], [IdNumber]FROM(SELECT [Id], [EventTime], [Location], [Event], [Details], [Dept], [IdNumber],ROW_NUMBER() OVER (PARTITION BY [IdNumber] ORDER BY [EventTime]) AS SeqFROM [Audit]WHERE EventTime >='[today]'AND [Event] = 'Valid access')tWHERE Seq=1
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs