Maintenance versioncleanup task not works


I have activated the maintenance cronjob on my Pimcore project (version 6.7.1)
It works for almost everything except for the “versioncleanup” task.

I receive this error:

It’s obvious that it’s a query wrong syntax error, but I don’t have any document in my project and I have never created any document.

What could be wrong?
Thank you