MySQL - Decimal values

Hi all,

I am setting up a Grafana interface to monitor values that are stored in a MySQL database. In one table, there is a field called “sun.altitude”. It stores the position of the sun in a decimal(10,5) format. I run the following query in a Grafana panel.

SELECT
UNIX_TIMESTAMP(time) as time_sec,
“sun.azimuth” as value
FROM table
WHERE $__timeFilter(time)
ORDER BY time_sec ASC

However, I get no values (“no data points”). If I put round(“sun.azimuth”), I get only zeros.

Does anyone has an idea what is the problem here?

Best regards

Hi,
Try to take off “AS VALUE” :

SELECT
UNIX_TIMESTAMP(time) as time_sec,
sun.azimuth
FROM table
WHERE $__timeFilter(time)
ORDER BY time_sec ASC

BR

1 Like

Hi

Thanks for the answer. It helped :slight_smile:

Best