In the table below
+-------+-----------------------+
| id | timestamp |
+-------+-----------------------+
| 1 | 2010-06-10 14:35:30 |
| 2 | 2010-06-10 15:27:35 |
| 3 | 2010-06-10 16:39:36 |
| 4 | 2010-06-11 14:55:30 |
| 5 | 2010-06-11 18:45:31 |
| 6 | 2010-06-12 20:25:31 |
+-------+-----------------------+
I want to be able to count the dates (time is ignored). So the output should be like below:
+-------+-----------------------+
| id | type | count |
+-------+-----------------------+
| 1 | 2010-06-10 | 3 |
| 2 | 2010-06-11 | 2 |
| 3 | 2010-06-12 | 1 |
+-------+-----------------------+
What would be the query for this?