title: SQL: Query to get the last change in value of a specific column
body: <p>So I have this table of product information. Each time a specific product is changed a new row is inserted with the new values, including time stamp and user who modified it. </p>
  
  <p>To show the information I search for the latest row for a specific product (which is identified by a column which is product_id). </p>
  
  <p>But now I need to know who was the last person that modified one specific column which is named status.</p>
  
  <p>So let's say my table consists of this</p>
  
  <p>So in essence I need to write a query that will tell me when was the last change for that given column.</p>
  
  <pre><code>product_id | name | status   | user | keyid
  --------------------------------------------
  598        | prrr | 0        | john | 10
  598        | prod | 1        | jane | 11
  456        | abcd | 2        | mac  | 12
  598        | prdd | 2        | kate | 13
  598        | rdpd | 2        | jane | 14
  456        | prrr | 3        | john | 15
  456        | abbb | 3        | kate | 16
  </code></pre>
  
  <p>So the latest information for product 598 is</p>
  
  <pre><code>598 rdpd 2 jane 14
  </code></pre>
  
  <p>BUT the last person that changed released is kate</p>
  
  <p>The latest information for product 456 is</p>
  
  <pre><code>456 abbb 3 kate 16
  </code></pre>
  
  <p>BUT the last person that changed released is john</p>
  
  <p>So Ideally, I would want to write a query that would return</p>
  
  <pre><code>598 kate 13
  456 john 15
  </code></pre>
  
  <p>I don't even begin to have an Idea on how to write such query, so I'm wondering if anyone can help me out here.</p>