摘要: 1. left semi join 类似 in \exists 的功能,但是更高效 a left join b 若1对多,结果集会出现多条数据,但是left semi join 只会筛选出a表中包含过关联条件的数据不会增加 2. left anti join a left anti join b 的 阅读全文
posted @ 2022-05-31 17:46 star521 阅读(2542) 评论(0) 推荐(0) 编辑
摘要: 抽取insert 的行数插入到另一个文本 https://www.runoob.com/linux/linux-comm-grep.html cat sxxxxx-20220330-bak.sql | grep -i insert >> sxxxx.sql 抽取某张表相关的insert语句 cat 阅读全文
posted @ 2022-05-31 17:37 star521 阅读(275) 评论(0) 推荐(0) 编辑
摘要: --自动生成json数据 select TABLE_NAME , concat (',',COLUMN_NAME) COLUMN_NAME , case when t.data_TYPE in('varchar','text') then 'string' when t.data_TYPE = 'd 阅读全文
posted @ 2022-05-31 17:27 star521 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1.collect_set 分组组合数组(数组内去重) collect_setselect code ,collect_set(tenant_id) from dim_mkt_event group by code;2.array_contains 数组中是否包含 ,返回布尔类型 select co 阅读全文
posted @ 2022-05-31 16:50 star521 阅读(2090) 评论(0) 推荐(0) 编辑