一、基础函数
where, distinct, group by, order by, having, like, as, avg, count, sum, min, max, if, join系列, limit, and, or, in, between and, locate, left, view, union, union all
二、进阶函数
1. 时间函数
1. current_date 当前日期
2. datediff 时间差
3. date_add/sub 时间加减
4. to_date 转日期
5. from_unixtime int型转时间戳
6. unix_timestamp 时间戳转int
2. 排序函数
1. row_number 数据相等时排名不同
2. rank 数据相等时排名相同 名次留下空位
3. dense_rank 数据相等时排名相同 名次不留空位
3. 字符串函数
1. substr 截取
2. concat 拼接
3. trim 清除左右两边空字符
4. replace regexp_replace 替换、正则替换
5. split 拆分
6. lpad 左补足
4. json函数
1. get_json_object json取值,取key的value
5. 分位数函数
1. percentile 分位数
6. 精度函数
1. round decimal 保

这篇博客总结了Hive中SQL的基础和进阶函数,包括where、group by、join、时间函数、排序函数、字符串函数、JSON操作、分位数函数、精度函数、分组组合函数以及行列转换等,是进行数据分析的重要工具。
最低0.47元/天 解锁文章
4008

被折叠的 条评论
为什么被折叠?



