其他分享
首页 > 其他分享> > 21.根据hive绑定数据统计计算保存到hive表中

21.根据hive绑定数据统计计算保存到hive表中

作者:互联网

创建upflow表

create external table mydb2.upflow (ip string,sum string) row format delimited fields terminated by ',';

 

 

 select ip,sum(upflow) as sum from mydb2.access group by ip order by sum desc;

 

 

 

将表access里面的内容导入到upflow表中

insert into  mydb2.upflow  select ip,sum(upflow) as sum from mydb2.access group by ip order by sum desc;

 

 

 

 

标签:21,ip,sum,表中,hive,access,upflow,mydb2
来源: https://www.cnblogs.com/braveym/p/11408671.html