group_contact 类似于 oracle的 wm_concat

解决方案 »

  1.   

    select pub_day from
    (select date_format(time,'%Y-%m-%d') as pub_day from table where time>='2011-12-01' and time<='2011-12-05'
     group by pub_day order by pub_day desc
    ) monthTotal  试试,有这种date_format(time,'%Y-%m-%d') 的时间格式化!
      

  2.   

    @yungeye 
    这个不行,执行不了。。谢谢
      

  3.   

    最后在网上找到了一个大神写的,可以实现,发上来给大家参考下:
     -- CREATE TABLE num (i int); -- INSERT INTO num (i) VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);-- select adddate('2012-09-01', numlist.id) as 'date' from (SELECT n1.i + n10.i*10 + n100.i*100 AS id FROM num n1 cross join num as n10 cross join num as n100) as numlist where adddate('2012-09-01', numlist.id) <= '2012-09-10';