Need help by creating alert | GROUP BY requires at least one aggregate function

Hello, i would create an alert, if the field "“upgrade_available” is 0 or 1, but i get the following Error.

Failed to evaluate queries and expressions: failed to execute conditions: failed to execute query A: GROUP BY requires at least one aggregate function

My Query is the following:

SELECT "upgrade_available" FROM "fritzbox" WHERE $timeFilter GROUP BY time($__interval)

group by always requires an aggregate function such as

sum
count
avg

etc

What are you trying to accomplish with that query? And what kind of data source is it?

Thanks for your quick answer, unfortunately i doesnt know anything about grafana and i brought it in the next time for only this 1 alert…

The data language is InfluxQL and here are bit more informations about the query:

SELECT last("upgrade_available") FROM /^$measurement$/ WHERE $timeFilter GROUP BY time($__interval)

This shows me if an update is avaiable or not and the mapping 1 is yes and 0 is no.

So did you resolve it? I am not sure I understand what you mean

Unfortunately not, could you please give me an example, which alerts if one value state switches from “false/0” to “true/1” ?