首页
技术
登录
6mi
u
盘
搜
搜 索
技术
HiveSQL实现WordCount
HiveSQL实现WordCount
技术
2023-11-22
91
先把句子拆成单个单词,再行专列,再利用子查询做聚合。
select
word, count
(
1
)
as cnts from
(
select explode
(
split
(
sentence,
","
))
as word from table
)
t group by word order by cnts desc
;
转载请注明原文地址:https://ipadbbs.8miu.com/read-46272.html
最新回复
(
0
)