title: Update with subquery in MySql
body: <p>I've two tables:</p>
  
  <pre><code>work (work_id (AI, PK), sent_date, received_date, visit_date)
  history_work(id_history_work (AI, PK), work_id (FK), sent_date, reseived_date, visit_date)
  </code></pre>
  
  <p>Relationship shoud be 1->n.</p>
  
  <p>I want to update work table so sent_date, received_date and visit_date shoud have the values of last inserted record in history_work table (last id_history value) with same work_id value.</p>