SyntaxFix
Write A Post
Hire A Developer
Questions
You are using word 'max' as an alias for your column. Try to:
MAX(id) as mymax ... WHERE ID - mymax