I am trying to get average of a column named player_count
week by week for the past 6 weeks.
This is the query I am using:
SELECT AVG(`player_count`), `updated_at` FROM `gtan_servers` GROUP BY WEEK(`updated_at`) ORDER BY `updated_at` DESC LIMIT 6
But I also want to get the week interval dates for each of the average that I get. For example, I get by running the above query, I get two averages 96 and 90. What I want is the start and end of the week (dates) in which the above averages were calculated.