码迷,mamicode.com
首页 > 其他好文 > 详细

basic command

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

标签:des   code   com   2014   name   for   

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

标签:des   code   com   2014   name   for   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!