Influx

From Giki

Select first entry

source: http://stackoverflow.com/questions/29193898/ddg#36184310

SELECT * FROM <SERIES> GROUP BY * ORDER BY ASC LIMIT 1

Select last entry

source: http://stackoverflow.com/questions/29193898/ddg#36184310

SELECT * FROM <SERIES> GROUP BY * ORDER BY DESC LIMIT 1
SELECT LAST("value") FROM <SERIES>

delete entry

with the time stamp e.g. from the last entry

DELETE FROM <SERIES> WHERE time = 1651497900000000000

retention policy and shard group

source: https://www.influxdata.com/blog/influxdb-shards-retention-policies/

CREATE RETENTION POLICY "12w" on "telegraf" DURATION 12w REPLICATION 1 SHARD DURATION 1d DEFAULT