title: Set Duplicate Values to Null in PostgresSQL retaining one of the values
body: <p>I have a database like this:</p>
  
  <pre><code>id    name    email
  0     Bill    bill@fakeemail.com
  1     John    john@fakeemail.com
  2     Susan   susan@fakeemail.com
  3     Susan J susan@fakeemail.com
  </code></pre>
  
  <p>I want to remove duplicate emails by setting the value to null, but retain at least 1 email on one of the rows (doesn't really matter which one).</p>
  
  <p>So that the resulting database would look like this:</p>
  
  <pre><code>id    name    email
  0     Bill    bill@fakeemail.com
  1     John    john@fakeemail.com
  2     Susan   susan@fakeemail.com
  3     Susan J 
  </code></pre>
  
  <p>I was able to target the rows like this
  <code>SELECT COUNT(email) as count FROM users WHERE count &gt; 1</code></p>
  
  <p>But can't figure out how to set the value to null while still retaining at least 1.</p>