title: Using InfluxDB difference function
body: <p>I have some measurement data in my influxdb database which I can query with:</p>
  
  <p><code>select * from E_real_con</code><br>
  name: E_real_con<br>
  time                value<br>
  ----                -----<br>
  1537920001044785525 | 57160036.00<br>
  1538006401069651036 | 57227208.00<br>
  1538092800108297103 | 57294112.00<br>
  1538179200697333731 | 57366108.00<br></p>
  
  <p>However, "value" is a cumulative value and I would like to get the delta/difference between two consecutive values.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>SELECT difference(last(value)) FROM E_real_con WHERE time &gt;= now() - 7d GROUP BY time(1d) fill(null)
  </code></pre>
  
  <p>However, I get the following error message:</p>
  
  <pre><code>ERR: unsupported difference iterator type: *query.stringInterruptIterator
  </code></pre>
  
  <p>I would be happy to get some hints and feedback how to solve my issue.</p>
  
  <p>I am using influxdb 1.6.1</p>
  
  <p>Thanks a lot!
  Christoph</p>