We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
DISTINCT ON()
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is the failing sql:
SELECT DISTINCT ON (column1) column_alias, column2 FROM table_name ORDER BY column1, column2;
Note that this parses without errors because it parses the ON (column1) as a function.
ON (column1)
When serializing back to string from ast, it produces:
SELECT DISTINCT ON(column1) AS column_alias, column2 FROM table_name ORDER BY column1, column2
The AS should not be there (it is an error in Postgres)
AS
The text was updated successfully, but these errors were encountered:
@nicksrandall, thanks for the report! Are you planning to work on this, or can I do that?
Sorry, something went wrong.
@AugustoFKL go for it. I don't have bandwidth ATM.
DISTINCT ON
DISTINCT ON (...)
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
Here is the failing sql:
Note that this parses without errors because it parses the
ON (column1)
as a function.When serializing back to string from ast, it produces:
The
AS
should not be there (it is an error in Postgres)The text was updated successfully, but these errors were encountered: