I have a table with two columns, an id, and a unix timestamp (i.e. not Mysql style, but just a pure seconds from 1970 type.)
I want to know how many timestamps there are in each day.
The query I have so far is:
SELECT unixtime, count(unixtime)
AS count
FROM core
GROUP BY unixtime
What I need to do of course is to round the unixtime stamp up to the nearest day. How do I do this?
Using
FROM_UNIXTIMEwithDATEshould get you the desired result: