Refs -- Removed unnecessary SQL AS clause in SQLCompiler.as_sql().
Incorrect on Oracle.
@@ -559,7 +559,7 @@ class SQLCompiler:
subselect, subparams = select_clone.as_sql(self, self.connection)
sub_selects.append(subselect)
sub_params.extend(subparams)
- return 'SELECT %s FROM (%s) AS subquery' % (
+ return 'SELECT %s FROM (%s) subquery' % (
', '.join(sub_selects),
' '.join(result),
), sub_params + params
