SELECT date(timestamp) as Date, day(timestamp) as Day, hour(timestamp) as Hour, count(*) as Count
FROM MyTable WHERE timestamp between '2014-07-02' and '2015-02-12'
GROUP BY date(timestamp), day(timestamp), hour(timestamp)

Comments

  1. Pingback: 1reproduction