Hi, I like to have a Singlestat Grafana panel which shows the diiference between the first() and last() value of a query. I am able to get those values in table:
Use Toggle Edit Mode, from the Menu at the end (≡), and enter the string directly. For my SingleStat, my Solar values are M.I. so I have something like:
SELECT max("value") - min("value") FROM "house-energy-total"
WHERE "topic" = 'house/energy_total/solar' AND $timeFilter