How to overwrite a column in SQL (Redshift) ?
The following query gives me an error Target table must be part of an equijoin predicate
UPDATE table1
SET rank = temp.new_rank
FROM (
SELECT ROW_NUMBER() OVER (PARTITION BY session_id ORDER BY date) AS new_rank
FROM table1
) temp;