title: UPDATE where timestamp is the latest
body: <p>I have a group of records all with the same data except the timestamp (Yeah, not my design)</p>
  
  <p>Example:</p>
  
  <pre><code>record_id, user, tmstmp
  1, myself, 2006-11-15 09:56:14.325882-05
  1, myself, 2006-11-15 09:56:19.051823-05
  1, myself, 2006-11-15 11:23:30.581366-05
  etc...
  </code></pre>
  
  <p>Now I would like to UPDATE the record with the latest timestamp.  Here is what I'm trying with no luck yet:</p>
  
  <pre><code>UPDATE tbl
  SET user = 'TESTING'
  WHERE record_id = 1
  ORDER BY tmstmp DESC
  LIMIT 1
  </code></pre>
  
  <p>The ORDER BY throws the syntax error.</p>
  
  <p>I think it should be a AND condition but not seeing how.  Any thoughts?</p>
  
  <p>PostgreSQL is my db.</p>