面试题,求用户与客户对话的时间间隔问题
题目
已知,有客服服务信息表如下:
CREATE TABLE IF NOT EXISTS fact_customer_service_info (
taskid STRING COMMENT "任务id",
createtime STRING COMMENT "创建时间",
userid STRING COMMENT "用户id",
specialistid STRING COMMENT "客服id",
senduserid STRING COMMENT "消息发送者id",
content STRING COMMENT "消息内容"
);
每天新增数据约1亿行
taskid | createtime | userid | specialistid | senduserid | content |
---|---|---|---|---|---|
3285620445415730000 | 2018-06-26 12:10:46.0 | 3281029200492120000 | 0 | 3281029200492120000 | aaaaaa |
3285620445415730000 | 2018-06-26 13:56:58.0 | 3281029200492120000 | 3275783155638360000 | 3275783155638360000 | bbbbb |
3285620445415730000 | 2018-06-26 13:57:32.0 | 328102920049212 |