Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Hello.
The request will be something like this, if I understand correctly.
SELECT t.field1, t.field2 FROM table AS t
WHERE condition
GROUP BY DAYOFMONTH(t.date), HOUR(t.date), MONTH(t.date)
Hourly:
SELECT ... FROM table AS t WHERE ...
GROUP BY DATE(t.date), HOUR(t.date) Daily
:
SELECT ... FROM table AS t WHERE ...
GROUP BY DATE(t .date)
By month:
SELECT ... FROM table AS t WHERE ...
GROUP BY YEAR(t.date), MONTH(t.date)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question