随笔分类 -  presto

摘要:1.获取两个时间差的天数:select date_diff('day',cast('2018-09-05' as timestamp),cast('2018-09-07' as timestamp)) as time_diff 获取dt 到当前的时间天数之差: select date_diff('d 阅读全文
posted @ 2022-05-09 18:47 羽毛球打的贼好 阅读(1548) 评论(0) 推荐(0)
摘要:nvl 是hive sparksql中常用的函数,其主要用法如下 例如NVL(string1,replace_with)中:当第一个参数(string1)为null时,返回第二个参数(replace_with);当第一个参数(string1)不为null时,则返回第一个参数(string1) pre 阅读全文
posted @ 2022-05-07 11:00 羽毛球打的贼好 阅读(5175) 评论(0) 推荐(0)