>SELECT TOP 10 Event.RO_No, >Min(Event.DateTime) AS LastUpdate, >min(Ro.FirstName) as FirstName > FROM Event >inner join RO on Event.Ro_No = RO.Ro_No > WHERE Event.Event_DateTime>'SomDate' GROUP BY Event.RO_No > ORDER BY MIN(Event.Datetime) >and not exists(select 1 from Event E where E.DateTim < ='SomeDate' and E.Ro_No = RO.Ro_NO)It is that I have dozens of lines in the main SQL, not just the FirstName. So, I need to find a way to keep the sub SQL as is and collect everything I need after in the main SQL.