Fixed SQL query syntax.