The query to get the rows:SELECT PointID, MAX(LoggedTimeStamp)FROM SomeTableWHERE PointID IN (2,4,5,...)GROUP BY PointIDThen to get the Value, you use the above as a derived table and join to the table:SELECT a.PointID, b.Value, a.LoggedTimeStampFROM( SELECT PointID, MAX(LoggedTimeStamp) AS LoggedTimeStamp FROM SomeTable WHERE PointID IN (2,4,5,...) GROUP BY PointID) aINNER JOIN SomeTable bON a.PointID = b.PointID AND a.LoggedTimeStamp = b.LoggedTimeStamp
Tara