Debug results:
- use
Table view
Panel editor overview | Grafana documentation - use
Query inspector
How To Use Grafana's Query Inspector to troubleshoot issues
You are not showing raw data from that query, so only guess it possible to find what can be wrong. And we can spend a days guessing or you can provide reproducible example with exact results/raw data from the query and then it is possible to pin point what’s wrong in the second. Guess: sensor_id
is numeric - cast it to be text, because Grafana is picky for data types.
Read doc: PostgreSQL data source | Grafana documentation - there are macros and each is for different time column type (there is not just “one” time type in PostgreSQL, so of course my example may not work if you, because you may have different time type in your table).