创建upflow表

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

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

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

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

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

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

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

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

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

05-11 15:39