Lets say I have a table of messages that users have sent, each with a timestamp.
I want to make a query that will tell me (historically) the most number of messages a user ever sent in an hour.
So in other words, in any given 1 hour period, what was the most number of messages sent.
Any ideas?
Assuming
timestampto be a DATETIME – otherwise, use FROM_UNIXTIME to convert to a DATETIME…For a [rolling] count within the last hour:
If you want a specific hour, specify the hour: