I am using Netezza (based on PostgreSQL) and need to select all columns in a table for rows distinct on one column. A related question with answer can be found here, but it doesn't handle the case with all columns, going by that answer throws an error:
select distinct on (some_field) table1.* from table1 order by some_field;
Snippet from error with real data:
"(" (at char 77) expecting '')''