title: Grafana Template Variables Query Giving different results in different version (Grafana 5.0 vs Grafana 7.0)
body: <p>I am using template variable queries to assign a variable in Grafana.</p>
  <p>SELECT * FROM jmeter WHERE application =~ /$tag_left/ ORDER BY time asc LIMIT 1</p>
  <p>Result JSON of this query is</p>
  <p>{&quot;results&quot;:[{&quot;series&quot;:[{&quot;name&quot;:&quot;jmeter&quot;,&quot;columns&quot;:[&quot;<strong>time</strong>&quot;,&quot;application&quot;,&quot;avg&quot;,&quot;count&quot;,&quot;countError&quot;,&quot;endedT&quot;,&quot;hit&quot;,&quot;max&quot;,&quot;maxAT&quot;,&quot;meanAT&quot;,&quot;min&quot;,&quot;minAT&quot;,&quot;pct90.0&quot;,&quot;pct95.0&quot;,&quot;pct99.0&quot;,&quot;rb&quot;,&quot;responseCode&quot;,&quot;responseMessage&quot;,&quot;sb&quot;,&quot;startedT&quot;,&quot;statut&quot;,&quot;transaction&quot;],&quot;values&quot;:[[<strong>1595241959625</strong>,&quot;demo_scenario.jmx @ 1 @ Mon Jul 20 16:15:58 IST 2020&quot;,null,null,null,0,null,null,0,0,null,0,null,null,null,null,null,null,null,0,null,&quot;internal&quot;]]}]}]}</p>
  <p>I need to get <strong>time</strong> from this query. Which is coming in version <strong>5.0</strong> of grafana but not coming in <strong>7.0</strong> version.</p>
  <p>Is there any way in which I can select the respective column like <code>time</code> from the query result and assign it to variable ? something like <strong>${var:index}</strong></p>
  <p>I am attaching the screenshot for more clarity on this.</p>
  <p><a href="https://i.stack.imgur.com/5flcO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5flcO.png" alt="Version 5.0" /></a></p>
  <p><a href="https://i.stack.imgur.com/uJ6kJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uJ6kJ.png" alt="Version 7.0" /></a></p>
  <p>As you can see, one is showing <code>timestamp</code> as variable value (e.g. 1595228080029), and another one is showing <code>application</code> value (e.g. demo_scenario.jmx @ 1 @ Mon Jul 20 16:15:58 IST 2020
  ) under Preview of values section as a result of query</p>
  <p>Underlining data source is <strong>InfluxDB</strong>. And in both the cases api query has same response.</p>