SELECTmy_array[CARDINALITY(my_array)]aslast_element
FROM...
SELECTIF(CARDINALITY(my_array)>=3,my_array[3],NULL)
FROM...
SELECTmy_array[1]ASfirst_element
FROM...
SELECTARRAY[1,2,3]ASmy_array
SELECTnameAS"UserName"
FROM"7day_active"
WHEREname='foo'
SELECT*
FROM"7day_active"
SELECTa||b||c
FROM...
SELECT
CAST(xASvarchar)
,CAST(xASbigint)
,CAST(xASdouble)
,CAST(xASboolean)
FROM...
7
2
SELECTCAST(5ASDOUBLE)/2
WITHaAS(
SELECTsubstr(name,1,3)x
FROM...
)
SELECT*
FROMa
WHEREx='foo'
SELECTstudent,score
FROMtests
LATERALVIEWexplode(scores)tASscore;
SELECTstudent,score
FROMtests
CROSSJOINUNNEST(scores)ASt(score);