Grafana time error postgres

[SELECT
$__timeGroupAlias(ReceivedAt,1s),
count(Message) AS “Message”
FROM SystemEvents
WHERE
Message LIKE ‘%10.10.202.2%’ and $__timeFilter(ReceivedAt)
GROUP BY 1
ORDER BY $__timeGroup(ReceivedAt,1s)]

He this is my Postgres code , i want to get from syslog (using postgres) but when i try there is a error pq: function time_bucket(unknown, timestamp without time zone) does not exist