![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL
EndlessLearn
这个作者很懒,什么都没留下…
展开
-
【SQL】redshift的 array (基础)
1. 将多列合并为一个数组-- array里的值可以类型相同,也可以类型不同select ARRAY(col1,col2,col3) as new_arrayfrom my_schema.my_table2. 拼接数组SELECT ARRAY_CONCAT(ARRAY(10001,10002),ARRAY(10003,10004))--结果为[10001,10002,10003,10004]3. 展开数组SELECT ARRAY_FLATTEN(ARRAY(ARRAY(1,2,3,4原创 2021-06-08 17:47:55 · 643 阅读 · 0 评论 -
【SQL】Hive中的时间日期函数
1. 日期与时间戳的转换时间戳转为日期from_unixtime(bigint unixtime[, stringformat])日期转为时间戳unix_timestamp(string date[, stringformat])to_unix_timestamp(string date[, stringformat])to_unix_timestamp 和unix_timestamp 都可以转化日期为时间戳,但据说前者效率更高。--时间戳转日期select from_unixtime(原创 2021-02-09 16:23:40 · 2331 阅读 · 0 评论