I have a table containing the following details:
date_info   info
2009-06-23  1
2009-06-24  2
2009-06-25  20
2009-06-26开发者_Go百科  14
2009-06-27  17
2009-06-28  5
2009-06-29  10
2009-06-30  2
etc.
I would like to group the info coloumn by occurrences per week and month, like so:
2009-06-01_2009-06-07 XXX
2009-06-08_2009-06-14 XXX
Grouping by a calendaric week would be ideal.
Ideas?
By the time I wrote the question, I figured out the solution: using WEEKOFYEAR:
SELECT WEEKOFYEAR(date_info) as MaWeek, SUM(info) from table1 GROUP BY MaWeek
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论