title: How to calculate time difference between current and previous row in MySQL
body: <p>I have mysql table t1 like this : </p>
  
  <p><a href="https://i.stack.imgur.com/YQDbx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YQDbx.jpg" alt="t1 table &quot; temporally created table from previous query "></a></p>
  
  <p>What i want to do is do calculations between all rows and save the value in new coloumn called diff </p>
  
  <pre><code>TICKETID| DATENEW  | DIFF
  16743     12:36:46   0
  16744     12:51:25   15.  minute  
  16745     12:57:25   6.5  minute
  ..........
  .......
  etc
  </code></pre>
  
  <p>i know there are similar questions ,but ive tried all of the solutions 
  posted here with no success,so how to solve this query ???</p>