mysql将数据按天,周,半月,月分组

最近有个需求,要求查出今天,一周,15天,一个月的数据code created是时间戳class 按天分组:时间戳 SELECT SUM(income) AS income, FROM_UNIXTIME(created, '%Y-%m-%d') AS create_data FROM `income` GROUP BY create_data ORDER BY create_data DESC 按
相关文章
相关标签/搜索