Creating upflow table
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;
The access table inside the content into upflow table
insert into mydb2.upflow select ip,sum(upflow) as sum from mydb2.access group by ip order by sum desc;