title: find difference between adjacent rows without using the 'lag' keyword
body: <p>I have some data as follows</p>
  
  <pre><code>ID,TimeStamp,Score
  975191,9/26/2015 23:24,38
  975191,9/26/2015 23:24,38
  975191,9/26/2015 23:24,38
  975191,9/26/2015 23:29,37
  975191,9/27/2015 0:21,21
  975191,9/27/2015 0:21,16
  975191,9/27/2015 0:25,16
  975191,9/27/2015 0:25,21
  975191,9/27/2015 0:51,35
  975191,9/27/2015 0:51,71
  975191,9/27/2015 19:01,16
  975191,9/27/2015 19:01,21
  975191,9/27/2015 19:11,35
  975191,9/27/2015 19:11,71
  975191,9/28/2015 22:12,38
  </code></pre>
  
  <p>I would like to find the difference between adjacent rows in TimeStamp as well as Score so that the output looks as follows</p>
  
  <pre><code>ID,TimeStamp,Score,Aging,Delta
  975191,9/26/2015 23:24,38,1014527,-38
  975191,9/26/2015 23:24,38,0,0
  975191,9/26/2015 23:24,38,0,0
  975191,9/26/2015 23:29,37,0,1
  975191,9/27/2015 0:21,21,1,16
  975191,9/27/2015 0:21,16,0,5
  975191,9/27/2015 0:25,16,0,0
  975191,9/27/2015 0:25,21,0,-5
  975191,9/27/2015 0:51,35,0,-14
  975191,9/27/2015 0:51,71,0,-36
  975191,9/27/2015 19:01,16,19,55
  975191,9/27/2015 19:01,21,0,-5
  975191,9/27/2015 19:11,35,0,-14
  975191,9/27/2015 19:11,71,0,-36
  975191,9/28/2015 22:12,38,27,33
  </code></pre>
  
  <p>This is the query I have written</p>
  
  <pre><code>SELECT
  ID,
  TimeStamp,
  Score,
  datediff(hour,ISNULL(convert(datetime, lag(TimeStamp) over(partition by ID order by Timestamp)), 0),TimeStamp) as Aging,
  ISNULL(convert(int, lag(Score) over(partition by ID order by Timestamp)), 0) - Score as Delta
  FROM TableName
  order by TimeStamp asc
  </code></pre>
  
  <p>So far so good,
  However I would like to get the same output without using the lag keyword because using the lag keyword on SQL Azure gives me</p>
  
  <pre><code>Keyword or statement option 'lag' is not supported in this version of SQL Server.
  </code></pre>