title: Sum Multiple Row Date Difference Mysql
body: <p>Table car_log</p>
  
  <pre><code> Speed  LogDate
   5      2013-04-30 10:10:09 -&gt;row1
   6      2013-04-30 10:12:15 -&gt;row2
   4      2013-04-30 10:13:44 -&gt;row3
   17     2013-04-30 10:15:32 -&gt;row4
   22     2013-04-30 10:18:19 -&gt;row5
   3      2013-04-30 10:22:33 -&gt;row6
   4      2013-04-30 10:24:14 -&gt;row7
   15     2013-04-30 10:26:59 -&gt;row8
   2      2013-04-30 10:29:19 -&gt;row9
  </code></pre>
  
  <p>I want to know how long the car get speed under 10. 
  In my mind, i will count the LogDate difference between row 1 - row4 (because in 10:14:44 => between row4 and row3, the speed is 4) + (sum) LogDate difference between row6 - row8. I am doubt if it right or no.
  How can i count it in mysql queries. Thank you.</p>