How to count occurrences of date only in a field that contains datetime data? I have a MariaDB database/table that contains log entries. For the purpose of example and broader help to other users, let's call the table FOO_TABLE and the field FOO_TIMESTAMP. 

The FOO_TIMESTAMP field had a data type of datetime.  Examples of content include: 

select FOO_TIMESTAMP from FOO_TABLE limit 10;
+---------------------+
| FOO_TIMESTAMP       |
+---------------------+
| 2013-01-21 12:28:17 |
| 2013-02-06 08:54:05 |
| 2013-02-06 08:59:55 |
| 2013-02-06 09:05:46 |
| 2013-02-06 11:47:38 |
| 2013-02-06 12:14:04 |
| 2013-02-06 12:15:05 |
| 2013-02-06 12:42:45 |
| 2013-02-06 13:01:49 |
| 2013-02-06 13:20:50 |
+---------------------+
10 rows in set (0.00 sec)


I want to get a count of how many rows were created per day.  I'm not interested in the specific time.  So for example, I'd like the following information from the data set above: 

2013-01-21     1
2013-02-06     9


I've searched prior stack exchange sites and see plenty of references to the GROUP BY option but I'm not sure how to only filter it on the date... and not have it look at the full time too. 

I can get the date by itself by running select date(FOO_TIMESTAMP) from FOO_TABLE; but I still can't get a count of the occurrences of that. 

I thought of trying something like select date(FOO_TIMESTAMP) as DATEONLY from FOO_TABLE group by DATEONLY;  but that still doesn't give me count of date occurrences.   

What am I missing here?
You just need to format the timestamp so it only shows the day, then group by that:

select date_format(foo_timestamp,'%Y-%m-%d'), count(*)
from foo_table
group by 1
order by 1;