How to attach timestamp for each query in Influxdb and Grafana?

I want to attach timestamp for each query in Influxdb. For example:

I want to achieve something like this

      x  time(x)   y   time(y)
a     1    2       3     4 
b     5    6       7     8

SELECT x+time(x) FROM measurement WHERE name GROUP BY name
SELECT y+time(y) FROM measurement WHERE name GROUP BY name

But what I get right now is just like this

       x    y    time
a      1    -      2
a      -    3      4
b      5    -      6
b      -    7      8

time = time(x)+time(y). Is there anyway to separate time into time(x) and time(y) for each query x and y ?

Thank you

you might want to try using Flux - using the map(), pivot() and join() functions you should get there I think.

Thank you for your suggestion ! I will try and let you know later