I am using influxdb and in the select query I read time and newTs as db field represents epoch in ns as below.
But when I add “where time >= newT” clause it does not work.
This throws “ERR: invalid operation: time and *influxql.VarRef are not compatible”
As I understand time is special field, if I add value of newT like where “time >= 1619195400000000000” then it works.
So how can I use variable in the where clause, I have added newTs as integer variable in the database, even I tried newTs::integer in the select query but it fails.
How to solve this problem?
Reference query output
select time, newTs, * from test order by DESC limit 5;