【发布时间】:2012-07-30 05:22:18
【问题描述】:
我想做一些事情,比如从表中获取所有行
where date >='2012-05-05' and date<='2012-07-20'
我希望 MySQL 返回 "group by" rows mont wise 从
2012-05-05 to 2012-06-05(incerement 1 month)
2012-06-06 to 2012-07-06(increment 1` month)
and remaining 2012-07-07 to 2012-07-20 (group the remaining 14 days)
我怎样才能写出我的查询来达到同样的效果?
谢谢...
【问题讨论】:
-
这样您将返回 month-plus-one-day 行,而不仅仅是 month-wise。
标签: mysql group-by monthcalendar