首页 > 其他 > 详细

basic command

时间:2014-06-21 09:29:34      阅读:353      评论:0      收藏:0      [点我收藏+]

1,su - db2inst

2,db2 connect to ids

3,db2stop force

4,db2 list db directory

5,db2 list tables for all

6,db2 describe table tablename

7,db2 "restore db JVC from ."

8,select * from (select a.*  , rownumber() over(order by rate desc) as rn   from (  select w201406.*,w2014_06.* ,case when phonesum  is null then 0 else phonesum*1.00/sum   end as rate     from  ( select  count(distinct SESSION_ID) as sum ,service_code  from IDS.TRACE_2014_6 where 1=1  and LOGIN_AT >= ‘2014-06-17 00:00:00‘  and LOGIN_AT <= ‘2014-06-17 23:59:59‘   group by service_code    ) w201406  left join  ( select  count(distinct SESSION_ID) as phonesum ,service_code  from IDS.TRACE_VID_2014_6 where 1=1 and id_type = 9191   and LOGIN_AT >= ‘2014-06-17 00:00:00‘  and LOGIN_AT <= ‘2014-06-17 23:59:59‘   group by service_code    ) w2014_06  on  w201406.service_code = w2014_06.service_code  ) a order by rate desc ) z where rn between 1 and 100 with ur"

basic command,布布扣,bubuko.com

basic command

原文:http://www.cnblogs.com/awk1983/p/3795051.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!