Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Help me to write a query

    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

Viewing post 1 (of 1 total)