Incorrect formatting of the DISTINCT ON construct
See original GitHub issue>>> import mo_sql_parsing
>>> q = "SELECT DISTINCT ON (col) col, col2 FROM test"
>>> mo_sql_parsing.format(mo_sql_parsing.parse(q))
'SELECT DISTINCT ON(col) AS col, col2 FROM test'
AS
is invalid part of the DISTINCT ON
construct
Checked on PostgreSQL 13
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Fastest way to PostgreSQL Distinct and Format - Stack Overflow
I have a 3.5 million rows in table acs_objects and I need to retrieve column creation_date with year only format and distinct.
Read more >Excel unique / distinct values: how to find, filter, select and ...
Select the column of data where you want to highlight unique values. On the Home tab, in the Styles group, click Conditional Formatting...
Read more >How to Highlight Distinct Values in Google Sheets - MakeUseOf
You can highlight distinct values in Google Sheets in two simple ways. Here's how! Google Sheets Logo Floating over a red background. There ......
Read more >Problem using DISTINCT in case insensitive SQL Server ...
We are querying the data from Preson.Contact in the AdventureWorks database. All data is setup as mixed case, so we have no duplicates...
Read more >5 easy ways to extract Unique Distinct Values - Get Digital Help
Type the Conditional Formatting formula in "Format values where this is true:". Press with left mouse button on "Format..." button.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thank you for pointing this out.
i also think that is a terrible oversight: https://www.geeksforgeeks.org/postgresql-distinct-on-expression/
fixing…
Thank you!