Is there an easy way to do a GROUP BY DATE(timestamp) that includes all days in a period of time, regardless of whether there are any records associated with th
GROUP BY DATE(timestamp)
There's a pretty straightforward way to do this… except that I can't remember it. But I adapted this query from this thread:
SELECT DISTINCT(LEFT(date_field,11)) AS `Date`, COUNT(LEFT(date_field,11)) AS `Number of events` FROM events_table GROUP BY `Date`
It works in MySQL too