Getting Error notification while refresh of graph

Hi all
I’m getting the folowing error while trying to refresh the graph data
Annotation Query Failed

Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘<time_column>) as time_sec, <text_column> as text, <tags_column> as tags’ at line 2

I’m using MySQL database. This is the query generated by the builder
SELECT
__timeGroupAlias(timeinserted,__interval),
sum(executions) AS “Safety Total”,
sum(failexecutions) AS “Safety Fail”
FROM Results WHERE __timeFilter(timeinserted) AND
testname = ‘Safety’ AND
sn = $PressSN
GROUP BY 1

i got the data in the graph:
image

this is the error from chrome


please advice