It is used to graph and monitor the data stored in InfluxDB.
In the dashboard, click on the top bar of a graph and select edit.
In the lower half of the screen there will be an area to change the rules for the graph. Click on the pencil on the right side and delete the default code.
Replace it with:
SELECT * FROM “DataTypeToGraph”
This will graph the data added to the database by a single InfluxDB node in Node-RED using the tag it was defined with.
In a new dashboard, under the sql code, from the dropdown select “Table”. After that select Table view from the tab on the right called Format. This should table each entry in the database instead of graphing it.
Use this SQL code to show only the last value recorded:
SELECT last(value) FROM “Data”
SELECT sum("value") / count("value")
FROM "Data"
WHERE $timeFilter