Have this query:
SELECT HOUR( DATE ) AS hr, COUNT( * ) AS cnt
FROM users
GROUP BY hr
ORDER BY cnt DESC
DATE is a DATETIME field and the above query shows me the most common hours in the date field.
I’m trying to improve it but not sure how to do it, I want to break it down by week days and within each week day to most common hours.
Try this query –