Relative time ranges with bigint(20) Timestamp

Hello everybody,
I use a MariaDB database in which the Timestamp column (ts) is in “bigint(20)” format. For example: 1599882908073 (=13 digits)

Correct results are shown in the graph and I can change the period using the Grafana calendar.

But the use of “relative time ranges” does not work.
I cannot find the correct “Where” statement for the macro to work.

Thanks in advance for your support!
Greetings
Daniel
Bildschirmfoto 2020-09-12 um 05.58.47

I solved the problem - this works:

SELECT
from_unixtime(ts/1000) AS time,
val as Solar_Energy
FROM ts_number
WHERE
id = 22 and
$__unixEpochFilter(ts/1000)
ORDER BY time