but on the first line
LAG(Data) I have an error. So I don't know LAG() function how to use in SQL Server 2008.
LAG(Data)
LAG()
How can I solve this trouble ?