title: mySql: count number of rows that have the same data in a column
body: <p>I am trying to select everything in a table, and also count the number of rows in a table that have the same data.</p>
  <pre><code>SELECT *, COUNT(thedate) daycount FROM `table` ORDER BY thedate DESC
  </code></pre>
  <p>My hope is to have one query that outputs the date and number of rows associated with that date, and the looped output will be something like this:</p>
  <blockquote>
  <p>Jan 1, 2000 (2 rows)<br />
  col1, col2, col3, col4<br />
  col1, col2, col3, col4</p>
  <p>Jan 1, 2000 (3 rows)<br />
  col1, col2, col3, col4<br />
  col1, col2, col3, col4<br />
  col1, col2, col3, col4</p>
  <p>Jan 1, 2000 (6 rows)<br />
  col1, col2, col3, col4<br />
  col1, col2, col3, col4<br />
  col1, col2, col3, col4<br />
  col1, col2, col3, col4<br />
  col1, col2, col3, col4<br />
  col1, col2, col3, col4</p>
  </blockquote>
  <p>etc...</p>
  <p>Does this make sense?</p>