This week's book giveaways are in the Cloud and AI/ML forums. We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line! See this thread and this one for details.
That's odd - somehow an extra ')' seems to get appended to the query. But it's anyway odd since the query has single quotes around the '3' - which your code doesn't add, assuming that what you posted is precisely what gets run.