当前位置:网站首页>Another implementation of lateral view explode
Another implementation of lateral view explode
2022-08-09 09:22:00 【research monk who doesn't like research】
Lateral view explode results:
If you don't use lateral view explode, you can do it like this:
Steps:
1. Turn one record into n identical records, ie
Put the serial number value in front, num is the key, answers[num] is the desired value,
2. The implementation of the above figure is achieved by connecting two tables,
The implementation of 3.B table is to generate incremental numbers, use space to get n spaces, and add serial numbers before the corresponding spaces
--Method 1selectrow_number() over() as idfrom(select split(space(299), ' ') as x) tlateral view explode(x) ex;--Method 2select pos + 1from(select 1 as id_start, 300 as id_end) tlateral view posexplode(split(space(id_end - id_start), ' ')) ex as pos, blank;
posexplode(array) t as pos, blank, only the first field has a value, which is the position, the second is empty, if it is a map, there is a value
边栏推荐
猜你喜欢
随机推荐
Amplify Shader Editor手册 Unity ASE(中文版)
convert转换时间详解
MySQL Checking and Filling Leaks (5) Unfamiliar Knowledge Points
【百日行动】炎炎夏日安全不松懈 消防培训“加满”安全知识“油”
栈的实现之用链表实现
学习双向链表的心得与总结
绝了,这套RESTful API接口设计总结
MySQL查漏补缺(二)排序检索、过滤数据、模糊查询、正则表达式
MySQL event_single event_timed loop event
本体开发日记05-努力理解SWRL(上)
数据库期末复习这一篇就够了(期末预习大概也行)
lateral view explode的另一种实现方式
The era of Google Maps is over, how to view high-definition satellite image maps?
测试计划包括哪些内容?目的和意义是什么?
接口测试的基础流程和用例设计方法你知道吗?
国产谷歌地球同款软件,查看下载19级高清卫星影像so easy!
jfinal加载配置文件原理
C#获取网卡地址
MySQL Leak Detection and Filling (2) Sorting and Retrieval, Filtering Data, Fuzzy Query, Regular Expression
PoPW token distribution mechanism may ignite the next bull market