Viewing post 1 (of 1 total)
Try this one
;WITH mas as(
select Max(mas.Time) as [Time]
from RealtimeData mas
GROUP BY convert(nvarchar,mas.Time,103)
)
select * from mas
CROSS APPLY
(
SELECT Value from RealtimeData sub
where sub.Time = mas.Time
) as sub
April 29, 2010 at 11:15 pm
#1160179