What Grafana version and what operating system are you using?
What are you trying to achieve?
I want to define a constant variable which contains a query, based on another constant variable as subquery
How are you trying to achieve it?
I now have to substitute the whole subquery instead of just the $[VariableName]
I always get an error
What did you expect to happen?
I wanted to merge both the query and subquery into a unique variable
Can you copy/paste the configuration(s) that you are having problems with?
It is something like:
SELECT TimeStamp, State, EventTrigger, lead(state) OVER (ORDER BY TimeStamp asc) as NextState, lead(EventTrigger) OVER (ORDER BY TimeStamp asc) as NextEventTrigger FROM ($All_Semi_Info) subquery1
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
Did you follow any online instructions? If so, what is the URL?
Welcome to the community support forums !!
We are excited that you joined our OSS community. Please read about some of the FAQs in the community
I am not an expert with MySQL queries but we do have documentation which defines how to create template variables for the queries. It can at least give you some start to proceed.
Hopefully, other community members can help you out