Error message resolusion?

I’m creating tables.
Data source is PostgreSQL.
When I click the option when do not have data,
and I got message on right side of the dashboard with red box.
Template variables could not be initialized:pq:syntax error at or near “)”
and then after that message
even the existing data shows the message as well.

The query is

select distinct(“Date(Start)” || ’ ’ || “Time(Start)” ) from sait._nanos2_nan where $__timeFilter(“timestamp$”) and filename IN ($filename)

How can I remove the error message?