Variable in influxdb query

I’m trying to create a variable checklist based on a query like this:
SHOW FIELD KEYS FROM plantperformance
This is returning the fieldnames used.

But how to put this into the databasequery?

I’m using v 6.2.4 of grafana


Are you using the Query Editor? You can put any query you like which is
supported by the back-end data source into that.

The Query Builder has its limitations - good for basics and for learning, but
the Query Editor is far more flexible.

Use Toggle Edit Mode to create your query, and do NOT toggle it back again
or you will lose what you wrote.