title: Mysql - double group by
body: <p>I've following query:</p>
  
  <pre><code>SELECT DATE(created) AS con_date,
         COUNT(*) AS con_per_day,
         GROUP_CONCAT(word_id)
  FROM connections
  WHERE created &gt; (NOW() - INTERVAL 30 DAY)
  GROUP BY con_date
  </code></pre>
  
  <p>Counts words added per day.</p>
  
  <p><img src="https://i.stack.imgur.com/0EHad.png" alt="enter image description here"></p>
  
  <p>All good, but I want to count uniques! Note word_id has 14,14 in the last raw. This must be counted as 1.</p>
  
  <p>I thought double group_by would cut it, but it seems to be a wrong way to do it.</p>
  
  <p>Any ideas?</p>