luodesong 90,100,100
xiaoming 90,90,90
create table if not exists arr(name string,score Array<double>
)
row format delimited fields terminated by't'
collection items terminated by','
;
select * from arr
select a.name, a.score[0], a.score[3] fromarr a wherea.score[1] > 90;
luodesong Chinese:90,Math:100,English:100
xiaoming Chinese:90,Math90,English90
create table if not exists map1(name string,score map<String,double>
)
row format delimited fields terminated by't'
collection items terminated by','
map keys terminated by':'
;
select * from map1
select m.name, m.score["Chinese"], m.score["Math"] frommap1 m wherem.score["English"] > 90;
luodesong 90,100,100
xiaoming 90,90,90
create table if not exists struct1(name string,score struct<Chinese:double,Math:double,English:double>
)
row format delimited fields terminated by't'
collection items terminated by','
;
select * from struct1
select s.name, s.score.Chinese, s.score.Math fromstruct1 s wheres.score.English > 90;
本文发布于:2024-02-02 00:10:03,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170680957440079.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |