if i use the same query in Grafana with table-view i have a completely different view and i’m really puzzled in how to solve it as it only shows one event and not i the way i want to, any help is wellcome.
I bumped into this problem. I went through far too many loops with AI tools to finally stumble on the answer, and I had to give it all manner of prompts to get there.
Both views illustrated are correct, but they are different ways of rendering the data supplied. I would guess that if a bit more of the InfluxDB screenshot was supplied (particularly above the table next to the search bar) we would see that these seven rows come from more than one table. I had a similar case: a six row resultset was labelled as 6 tables 6 rows (each table had one row).
What was happening in my case is that a group() function produces a table per group. I should think the same is happening here in the Grafana screenshots above, and the drop-down serves to choose between tables. (I suspect that the empty drop-down is just due to a missing _value or similar. That can be fixed, but it isn’t the headline here).
So to resolve this one has to unwrap or ungroup, and to do that one needs to do a group() with no parameters. So I think the functional approach is:
Do a group(columns: ["col1", "col2", "col3"...])
Do filtering, sorting, etc on the multi-table resultset
Ungroup using group() with no parameters, to create a single table
This works in the Simple Table rendering in InfluxDB (no change) and it will also work in the Table visualisation in Grafana (fixing the problem in the OP).