如题:
同一个hive sql(统计各来自渠道的日活跃用户),统计的是11号的数据,已经没有数据写入,可是,统计结果会变动:
SELECT l.group_id,l.channel_id,COUNT(DISTINCT l.`user_id`) AS `num` FROM log.`user_login` l WHERE l.login_time BETWEEN UNIX_TIMESTAMP("2015-12-11 00:00:00") AND UNIX_TIMESTAMP("2015-12-11 23:59:59") group by l.group_id,l.channel_id order by `num` desc;
会得到不同结果:
3
2
1
|
|