title: Update MySQL table with another table's data
body: <p>I read <a href="https://stackoverflow.com/questions/5727827/update-one-mysql-table-with-values-from-another">this</a> and <a href="https://stackoverflow.com/questions/1202075/advanced-mysql-query-update-table-with-info-from-another-table">this</a>, but I need to make a GROUP BY query to set another table.</p>
  
  <p><code>logintable</code> is like this:</p>
  
  <pre><code>id | name    | login_date
  ------------------------
  1  | michael | 2013-01-04 
  2  | michael | 2013-01-08 
  3  | mary    | 2013-01-11 
  4  | john    | 2013-01-15 
  5  | michael | 2013-01-19 
  6  | mary    | 2013-01-22 
  7  | john    | 2013-01-26 
  </code></pre>
  
  <p>I make a query like this:</p>
  
  <pre><code>SELECT * FROM logintable GROUP BY name ORDER BY id ASC
  </code></pre>
  
  <p>This gives me first login date of the users:</p>
  
  <pre><code>1  | michael | 2013-01-04 
  3  | mary    | 2013-01-11 
  4  | john    | 2013-01-15 
  </code></pre>
  
  <p>I have another table called <code>userstable</code> like this:</p>
  
  <pre><code>id | name    | last_seen_date | first_login_date
  ------------------------------------------------
  1  | michael | 2013-02-02     |  
  2  | john    | 2013-02-04     |   
  3  | mary    | 2013-02-16     |  
  </code></pre>
  
  <p>I need to update userstable's first_login_date column, with the first result. How can I do this ?
  (I have 75k records in logintable and 10k records in userstable)</p>