title: Removing duplicate values in column with added unique constraint
body: <p>I have a table with a displayName column that I have added a "unique" constraint to.  I am trying to write a migration that will set any non unique displayName to null, leaving only the displayName with the lower User Id as is.  Here is my query:</p>
  
  <pre><code>UPDATE "User" SET "displayName" = NULL
              WHERE id IN (SELECT id,
                          FROM (SELECT id,
                                    ROW_NUMBER() OVER (partition BY "displayName" ORDER BY id) AS rnum
                                FROM "User") t
                          WHERE t.rnum &gt; 1);
  </code></pre>
  
  <p>When I attempt to run the migration I am getting back "error: syntax error at or near "FROM"".  </p>
  
  <p>Thanks</p>