08 2018 档案
摘要:select t1.owner ,t1.table_name ,t1.column_id ,t1.column_name ,t1.data_type ,t2.comments from all_tab_columns t1 join all_col_comments t2 on t1.owner = t2.owner ...
阅读全文
摘要:1 -- 当年/月/日累计指标数据初始化 2 with data_day as ( 3 select 'a' name,'2016-07-01' as day, 1 as value union all 4 select 'a' name,'2017-07-01' as day, 2 as value union all 5 select 'a' nam...
阅读全文
摘要:wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u141-b15...
阅读全文
摘要:1 -- 根据指定日期找出前后30天内生日的客户 2 select 3 t2.day as etl_dt 4 ,t1.id 5 ,t1.day 6 ,t2.flag_first 7 ,t2.flag_last 8 ,concat(year(t1.day) - 1,t2.day_first) as day_first_1 9 ...
阅读全文
摘要:select regexp_replace(reflect("java.util.UUID", "randomUUID"), "-", "") as uuid ,rand() -- rand_num ,rand(100) -- rand_num_seed ; SELECT * FROM DISTRIBUTE BY RAND() SORT B...
阅读全文
摘要:https://www.python.org/ftp/python/3.6.6/ https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz ### 通过pip安装itchatpip install itchat ### 导入包import
阅读全文
摘要:-- 指定时间所在的季度的第一天 SQL实现: 2. 创建相应的日期维表可以实现 3. 通过shell可以实现
阅读全文
摘要:-- 切换数据库 use database_name; -- 优化本地查询 set hive.fetch.task.conversion=more; -- 设置hive的计算引擎为spark set hive.execution.engine=spark; -- 打印表头 set hive.cli.print.header=true; set hive.cli.print.row.to...
阅读全文
摘要:-- 列转行 select name ,str[0] as id ,str[1] as age from ( select name ,split(name_tmp,',') as str from ( select 'a,10|b,11|c,12' as name ) t1 later...
阅读全文
摘要:hive -S -e "select * from db_name.table_name limit 0"|grep table_name|xargs -n1|sed 's/table_name.//g'
阅读全文