title: mysql syntax to return latest total of multiple lines
body: <p>That may be the worst title I've ever written!</p>
  
  <p>I have a table with entries similar to this:</p>
  
  <pre><code>1 ¦ ABC1 ¦ 21
  2 ¦ DEF2 ¦ 43
  3 ¦ DEF2 ¦ 44
  4 ¦ XYZ9 ¦ 18
  5 ¦ ABC1 ¦ 19
  </code></pre>
  
  <p>I'm trying to phrase a statement in MySQL that would return just:</p>
  
  <pre><code>ABC1 ¦ 19
  XYZ9 ¦ 18
  DEF2 ¦ 44
  </code></pre>
  
  <p>...so the latest individual total for each unique code. I'm new to the language and can't crack the syntax!</p>
  
  <p>Hopefully that makes sense but please feel free to ask any clarifying questions (of course!).</p>
  
  <p>Many thanks,</p>
  
  <p>Jon</p>