How can I merge rows in a grafana table panel?

Good morning, I’m trying to make a table with timeseries data that is stored in influxdb. I’m using the grafana table panel. When my two returned values has the same timestamp my table is showed properly but when the two returned values has a diferent timestamp they are showed in diferent rows (they are in the same second but not in the same milisecond). I want to know how can I change my query to has values in the same row although they are not in the same timestamp (precision of seconds not miliseconds). I think that the solution is to change the epoch param or the precision param but I dont know how to do it. Can anyone help me?

Here is my table:

Here is my query:

Thank you in advance

I’m not sure if it possible to change the precision of the timestamp in the query.

One option is to aggregate (group by) time, for example group by minute or group by 1 second.

GROUP BY time(1s)

Another solution is to use a coarser timestamp when writing the data to Influxdb: https://docs.influxdata.com/influxdb/v1.7/troubleshooting/frequently-asked-questions/#does-the-precision-of-the-timestamp-matter

I understand what you are saying but if i write group by time (1s) I dont see anything. All my timestamps are within 1s

How can I set the precision to seconds when defining a panel?

Just to double check - do you mean that everything got grouped to one row or do you mean that you got no data returned? If no data was returned then it sounds like you did not write a valid query with an aggregation function.

Sorry - don’t know if there is a way to do that and I couldn’t find anything in the docs for InfluxDB.

It looks like you can set the precision for queries and writes for the database with a flag when you start the InfluxDB service:

Maybe someone on the InfluxData forum knows how to specify it in a query.

I dont know why but theres no data returned when I group by time. Do you know why?

results:Array[1]

0:Object

statement_id:0

error:“not executed”

What does your query look like after you added the group by time?

It looks like this:
"SELECT “value” AS “IdUv” FROM “mqtt_consumer” WHERE (“topic” = ‘Instalacion/0/UVComs/UV/1/IdUv’ OR “topic” = ‘Instalacion/0/UVComs/UV/2/IdUv’) AND time >= now() - 6h GROUP BY time(1s) ORDER BY time DESC LIMIT 2;

Hey Danielle,

Can we group the data data by row and sum up the value. I am new to Grafana. Would be glad if you could help.

I want to club wynk-hls and gaana-hls and return the sum as 491, while keeping intact the remaining table.

can we do this?

Many thanks.