摘要: trunc 函数可用于截取日期时间 用法:trunc(字段名,精度) 具体实例: -- 按1分钟聚合 select trunc(stime, 'MI') as stime -- 按1小时聚合 select trunc(stime, 'HH') as stime -- 按1天聚合 select tru 阅读全文
posted @ 2018-02-28 19:56 林中飞燕 阅读(3054) 评论(0) 推荐(0)
摘要: 一、from_unixtime 和unix_timestamp 如下: 1, select from_unixtime(unix_timestamp(data_datetime)-unix_timestamp(data_datetime)%300) as tm, bussinessname, sum 阅读全文
posted @ 2018-02-28 19:35 林中飞燕 阅读(1748) 评论(0) 推荐(0)