Jdbc_static: Getting a sql syntax error I did'nt write

I don't have a solution, but I am getting wiser SET GLOBAL sql_mode = 'ANSI_QUOTES'; changes the database setup

From https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
ANSI_QUOTES

Treat " as an identifier quote character (like the quote character) and not as a string quote character. You can still use to quote identifiers with this mode enabled. With ANSI_QUOTES enabled, you cannot use double quotation marks to quote literal strings because they are interpreted as identifiers.

As written here, the offending piece of sql code is a count number of rows in the table that I am trying to load with jdbc_static{loaders... When downloading a table, it needs a checksum to know when its complete. That is why logstash-input-jdbc works on this server, but logstash-filter-jdbc_static don't. logstash-input-jdbc don't need the checksum

I tried to implement the SET GLOBAL sql_mode = 'ANSI_QUOTES'; into my query statement, but you need to be a superuser to make global database changes.