title: mysql using DISTINCT for only one column
body: <p>Is there a way to use DISTINCT (or another keyword) to not display duplicate results on one column? For example if I have a table with columns: id, name and countryCode</p>
  
  <pre><code>id name countryCode
  1  Dan  IE
  2  John US
  3  John UK
  4  Bob  DE
  </code></pre>
  
  <p>And I don't want to display duplicates where the name is the same so the result would be:</p>
  
  <pre><code>id name countryCode
  1  Dan  IE
  2  John US
  4  Bob  DE
  </code></pre>
  
  <p>If I use DISTINCT here it needs to match the whole row but I only want to omit a row if the names match. Is there a way to do this? I found a similar solution here:<a href="https://stackoverflow.com/questions/5021693/distinct-for-only-one-column">DISTINCT for only one Column</a></p>
  
  <p>But this does not work for mySQL. Any help would be much appreciated.</p>