Meaning of the query

Hi Guys,

This is a very basic query that I am trying to understand. I have a query for visualizing data in Grafana, that reads

SELECT mean("Value") FROM "3_weeks"."PROCESS" WHERE ("Name" = 'DC-bus voltage') AND $timeFilter GROUP BY time($__interval) fill(linear)

  1. What is the value of the variable $__interval and from where does it get its value?
  2. What is the significance of Grouping it by that interval and taking the mean? What if it was not grouped (I get the same graph)? Is it related to computational efficiency?


If you are

  1. See global variables Grafana documentation, for what the variables do and how they behave.
  2. It’s not the same, it’s the difference between having the “average value” of every minute (or any other time interval 2m|5m|1h|…) versus just the global average. So no, the chart won’t be the same at all as it will display just one point.

In case you are learning InfluxQL, I suggest you start from the docs here

1 Like