2016年7月

SQL之rank/dense_rank/row_number差异

SQL之rank()、dense_rank()、row_number()的差异

--rank() dense_rank() row_number()
with xx as
 (select '1' testid, 'A1' testname, '20090520' creat_time
    from dual
  union all
  select '2' testid, 'A2' testname, '20090521' creat_time
    from dual
  union all
  select '2' testid, 'A3' testname, '20090522' creat_time
    from dual
  union all
  select '2' testid, 'A5' testname, '20090522' creat_time
    from dual
  union all
  select '3' testid, 'A4' testname, '20090523' creat_time
    from dual)
select xx.*,
       rank() over(order by xx.testid) rank,
       dense_rank() over(order by xx.testid) dense_rank,
       row_number() over(order by xx.testid) row_number
  from xx order by testid;

Shadowsocks不能使用解决办法

最近经常有朋友说SS突然翻不了墙了,原先通过查找原因以为是迅雷的问题,最后把迅雷卸载了就好使了,今天又有人反馈说不好使了,再次Google,原来迅雷占用了1080端口,把SS的代理端口修改1080以外的不被占用端口就可以了。不用折腾这些服务和迅雷的。测试过也正常使用了。希望对大家有用。

Title - Artist
0:00