Display S0-Impulse Values

Looks like you wanna calculate consumption per time unit. To do that you need to aggregate by time. In master there is a $__timeGroup macro for mysql but it didnt make it into 4.6.0.

You probably want something similar to the following query:

SELECT
  cast((timestamp/1000)/300 as signed integer)*300 as time_sec,
  sum(value) as value,
  "Stromverbrauch" as metric
FROM data
WHERE cast(timestamp/1000 as signed integer) > $__unixEpochFrom() and cast(timestamp/1000 as signed integer) < $__unixEpochTo() and
channel_id = 16
GROUP BY 1
ORDER BY 1

300 is the time interval for the time interval you want to calculate the rate for in seconds. 300s = 5m