title: Mysql selecting unique values
body: <p>I am really stuck with an sql query... I hope someone can help shed some light for me.</p>
  
  <p>Here is what my table looks like</p>
  
  <pre><code>mysql&gt; show fields from france_data;
  +----------+-------------+------+-----+---------+----------------+
  | Field    | Type        | Null | Key | Default | Extra          |
  +----------+-------------+------+-----+---------+----------------+
  | id       | int(11)     | NO   | PRI | NULL    | auto_increment |
  | email    | varchar(45) | YES  |     | NULL    |                |
  | name     | varchar(45) | YES  |     | NULL    |                |
  | lastname | varchar(45) | YES  |     | NULL    |                |
  | quality  | varchar(45) | YES  |     | NULL    |                |
  | country  | varchar(45) | YES  |     | NULL    |                |
  | state    | varchar(45) | YES  |     | NULL    |                |
  | year     | varchar(45) | YES  |     | NULL    |                |
  | owner    | varchar(45) | YES  |     | NULL    |                |
  +----------+-------------+------+-----+---------+----------------+
  9 rows in set (0.00 sec)
  </code></pre>
  
  <p>Here's the catch, I have duplicate data in my table, I would like to pull out all data from this table, non-duplicated based on the email.</p>
  
  <p>I ran a simple count like this:</p>
  
  <pre><code>mysql&gt; select count(*) from france_data;
  </code></pre>
  
  <p>and this is the result set:</p>
  
  <pre><code>+----------+
  | count(*) |
  +----------+
  |  2405259 |
  +----------+
  1 row in set (0.01 sec)
  </code></pre>
  
  <p>Now I tried to run a count like this:</p>
  
  <pre><code>mysql&gt; select count(*) from france_data group by email;
  </code></pre>
  
  <p>Just to see how many unique records I have. Unfortunately this times out.</p>
  
  <p>Does any one know how I can do a count of unique rows and select of the same type?</p>