title: Update table based on self table lookup in redshift
body: <p>I have the below table, </p>
  
  <pre><code>id   email   mgr_email   mgr_id
  -------------------------------
  1    email1   email2    
  2    email2   email3
  3    email3   email4
  </code></pre>
  
  <p>I want to populate the column mgr_id from id column by matching mgr_email with email, just like below:</p>
  
  <pre><code>id   email   mgr_email   mgr_id
  -------------------------------
  1    email1   email2      2
  2    email2   email3      3
  3    email3   email4      
  </code></pre>
  
  <p>The below query gets me the required result in postgres:</p>
  
  <pre><code>update mytable t1 set mgr_id=t2.id from mytable t2 where t1.mgr_email=t2.email
  </code></pre>
  
  <p>But when I try in redshift it gives me the below error:</p>
  
  <pre><code>ERROR:  syntax error at or near "t1"
  LINE 1: update mytable t1 set mgr_id=t2.id from mytable t2 where t1.mg...
                         ^
  </code></pre>
  
  <p>How do I do this in redshift ?</p>