1SELECT
2 SUM(nb_like) AS nb_like,
3 CONCAT
4 (
5 STR_TO_DATE(CONCAT(YEARWEEK(date, 2), ' Sunday'), '%X%V %W'),
6 '-',
7 STR_TO_DATE(CONCAT(YEARWEEK(date, 2), ' Sunday'), '%X%V %W') + INTERVAL 6 DAY
8 ) AS week
9FROM fb_stats
10GROUP BY YEARWEEK(date, 2)
11ORDER BY YEARWEEK(date, 2);
12