When using models with a different database software than the default, the old code produced a syntax error.
Using the Grammar from the query ensures that the alias is always wrapped correctly.
Suggestion: The code should be scanned for similar errors, produced by using DB Facade.