SQL
不吃鱼的cat
喜欢是不可超越的力量
展开
-
Presto 和 Hive 的sql语句(函数)的切换使用(不断更新中...)
presto 与 hue 的切换使用```bashHive:collect_set转为数组并去重,concat_ws将数组用逗号间隔连接成字符串select user_id, concat_ws(',', collect_set(order_id)) as order_idsfrom test_tablewhere 1 = 1group by user_id ;Presto:array_agg转为数组,array_distinct去重,array_join将数组用逗号间隔连接原创 2021-12-13 15:21:27 · 1461 阅读 · 0 评论 -
HQL 连续使用多次left join
多次left join表a 、表b、表ca left join b on 条件1 left join c on 条件2 left join d on 条件3a和b join 然后 ab和c join 然后 abc和d join啊,最后形成abcd表,然后取出所需字段原创 2021-09-09 12:14:36 · 569 阅读 · 0 评论