what is your data source> mysql?
no, I use AWS timestream
Looks like you have opened another thread about this.
For me it is not the same?
Here I need the query without a “time series” correct? Completely different problem or do I miss something? If you think it is the same please let me know.
For that I would recommend you ask that question on an AWS timestream forum or look at the documentation for it as it is not a grafana related issue.
But as an example in Microsoft SQL Server there is this function
RANK () OVER ( PARTITION BY soldDate --divides the products into partitions by soldDate ORDER BY soldDate DESC --orders those partitions by soldDate )
which gives you same product sold on same date and then ranks those rows so that you have the following
name,soldDate,rank foo,2023-06-06 10:00,1 foo,2023-06-06 09:00,2 foo,2023-06-06 08:00,3
Then you select the item with the lowest rank to find the earliest of the sales date for foo.
select * from (ranking) where rank = 1 --gives you name,soldDate,rank foo,2023-06-06 10:00,1
This would work for all other products. Try to find the same function or way of doing this in aws stream querying.
I found the answer here: Effective queries for common query patterns in Amazon Timestream | AWS Database Blog
My query looks like this now:
SELECT sensor_id ,max_by(time, time) AS time ,max_by("measure_value::double" , time) AS value FROM "sensordb"."ruesselsheim" WHERE "measure_value::varchar" IS NULL and sensor_id IN ( '28-02149245a540', '28-02159245c2cf', '28-3ce1045708a9', '28-3ce104572746' ) GROUP BY sensor_id
I removed the transform now. But I do not understand how to display for each sensor a gauge?
Currently the sql response and my gauge looks like that:
Where is the magic happening now to display for each sensor one gauge?
Wait! I selected all values now and see 4 different gauges.
How can I change the color for each gauge now?
With the value-mapping i was able to rename the labels. But the color which i have changed there is not effecting my gauge. Why?
look back in all the threads. there you will find your answers young jedi, use the force
Do you mean the “value mapping” or something else?