Multiple time series on one graph for records with deferent time

Hi there,
I have a temperature sensors - each sensor is sending data at different time. I would like to use one query to get all temperatures and plot on one graph with time series.

I would like to have result like

But having like :

Data are store in mysql DB. Query which I’m using looks like :slight_smile:

SELECT
  UNIX_TIMESTAMP(time) AS "time",
  CONCAT(room, ' ', name) AS metric,
  state
FROM metrics
WHERE
  time BETWEEN FROM_UNIXTIME(1651372668) AND FROM_UNIXTIME(1651394268) AND component_type LIKE "TEMP_SENSOR"
ORDER BY time

How can I get result as expected - so present all temperatures on one graph using one mysql query ?

what version of grafana?
are you using the time series panel or graph (old)
have you played with the options in the panel editor for switching from lines to bars to points?

CleanShot 2022-05-24 at 16.08.47