title: Simple SQLite UPDATE Statement does not work
body: <p>I inserted a new column in my database and want to populate with data. It shall be calculated from the difference of the value of <code>nom_arr_time</code> and the value of <code>nom_dep_time</code> of the previous row. </p>
  
  <p>If I try to execute the SELECT statement only everything works fine. But the update won't work, the column stays empty.</p>
  
  <pre class="lang-sql prettyprint-override"><code>UPDATE mobile_statistik 
  SET nom_fahrzeit = (SELECT nom_arr_time - LAG(nom_dep_time,1,0) OVER (ORDER BY id) 
                      FROM mobile_statistik);
  </code></pre>
  
  <p>Handling the task through a programming language like python is not an option because of the size, ca. 20GB of the database.</p>