Mysql按小時,按日,按周,按月,按季度,按年分組統計數據

按小時:sql select from_unixtime(create_time,"%Y%m%d%H") as hours,count(id) as counts from table group by hours;函數 按日:spa select from_unixtime(create_time,"%Y-%m-%d") as days,count(id) as counts from tabl
相關文章
相關標籤/搜索