Thank you so much for helping me think through this!
As I mentioned I'm a little new to sql and was having a hard time telling if I was using the wrong functions or bad syntax (although it was most likely both) and totally overthinking it.
I used the following and it seems to be working. I'll have to test it against a full dataset but looks good!
SELECT TubeDestination, MAX(TimeSent)
WHERE TimeSent < dateadd(hh,-1,getdate())
GROUP BY TubeDestination
I'm still not quite sure how to get the TimeSent to display as well for the selected TubeDestination but I think the hard part is done. Thanks Dan
Last edited by Dumb Dan; April 5th, 2011 at 10:23 PM..