title: MySQL Distinct function
body: <p>I have a table of customer orders with columns email, firstname and surname.  I want to email everyone who has purchased.  I thought that using:</p>
  
  <pre><code>SELECT DISTINCT email, firstname, surname FROM ...
  </code></pre>
  
  <p>would work to return all unique email addresses and first name and surname.</p>