Skip to content
Advertisement

MySQL Query GROUP BY day / month / year

Is it possible to make a simple query to count how many records I have in a determined period of time like a year, month, or day, having a TIMESTAMP field, like:

Or even:

To have a monthly statistic.

Thanks!

Advertisement

Answer

Check out the date and time functions in MySQL.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement