现在的位置: 首页 > 综合 > 正文

hive 技巧

2013年05月27日 ⁄ 综合 ⁄ 共 153字 ⁄ 字号 评论关闭

EXPLAIN  select user_id,count(1) as  cc from XXX  group by user_id;

检查语法是否有问题:用EXPLAIN。

select avg(cc)
from
(
   select user_id,count(1) as  cc
   from XXX
   group by user_id
)t;

抱歉!评论已关闭.