Previously I have a Grafana panel with the following SQL query:
SELECT abs(sum("volume_buy")-sum("volume_sell"))/sum("volume") FROM "kline_ext" WHERE $timeFilter GROUP BY time(5m), "pair" fill(0)'
Now I’m upgrading to InfluxDB 2, I’m struggling to rewrite the SQL above into flux language.
Any suggestions? Thanks a lot