分享

此种海量数据统计如何用HIVE实现?

bioger_hit 发表于 2015-4-5 21:02:52
尘世随缘 发表于 2015-4-5 20:37
select count(userid) as typecount,userid,optype from op_log group where opData>时间 and opData



改成这种形式
  1. select T.count,T.optype,T.typeCount from  
  2. (select count(a.Optype) typeCount,a.Optype optype,a.Userid userid  from op_log a join user_info u on(a.Userid=u.Userid and a.opData>时间 and a.opData<时间))
  3. T GROUP BY T.type
复制代码


回复

使用道具 举报

12
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条