SELECT COUNT(*) FROM volkszaehler.tobias_aggregate; SELECT COUNT(*) FROM volkszaehler.data WHERE channel_id = 1 OR channel_id = 4; SELECT MAX(volkszaehler.tobias_aggregate.timestamp_start), channel_id FROM volkszaehler.tobias_aggregate GROUP BY channel_id; DELETE FROM volkszaehler.tobias_aggregate; SELECT * FROM volkszaehler.tobias_aggregate WHERE channel_id=4 AND timestamp_start>=1740697200000 AND timestamp_end<=1740783600000 ORDER BY timestamp_start; SELECT MIN(timestamp_start), MAX(timestamp_end), SUM(sum_positive), SUM(sum_negative), COUNT(*) FROM volkszaehler.tobias_aggregate WHERE channel_id=4 AND timestamp_start>=1704063600000 AND timestamp_end<=1735686000000; SELECT SUM(value) FROM volkszaehler.data WHERE channel_id=4 AND value < 1.0 AND value > 0.0 AND timestamp>=1704063600000 AND timestamp<=1735686000000; SELECT * FROM volkszaehler.data WHERE channel_id=4 AND timestamp>=1704063600000 AND timestamp<=1735686000000 AND value>0 ORDER BY timestamp; SELECT timestamp FROM volkszaehler.data WHERE channel_id=4 AND timestamp >= 1740697200000 ORDER BY timestamp