I tried an InfluxDB query with a tag named address::tag in the where clause and then wanted to group by the same tag, however it does not show up in the drop down list of available tags to group by. I can trick it by choosing a different tag in the list and then type in the tag manually.
Grafana version: 9.5.2
How to test: Create an InfluxDB query with a tag in the where clause. The tag used in the where clause does not seem to show up as an available option to group by.
The idea was to slim down the result from the query by using a regex in the where clause to filter out only parts of the available values for the tag in question, and then group by them.
I can confirm this bug. If the where-clause uses a tag, Grafana doesn’t allow selecting the same tag in the group by. This is required in cases where the tag is matched to a multi-variable, and one want to see separate lines for each selected value.
I found this Github issue that seems to be the same, and that it was fixed by a PR 5 days ago: