I have a big redshift database. the records do not have unique key.
I'd like to convert the below sql to postgresql.
DELETE FROM (
SELECT *,ROW_NUMBER() OVER (partition BY column1, column2, column3) AS rnum
FROM tablename ) t1
WHERE t1.rnum > 1;
perform the above sql,the following errors appear :
Amazon Invalid operation: syntax error at or near "(";
please :'( .