SQL系列
如果只想要截取时分秒 直接
from_unixtime(cast(create_time/1000 as bigint),'HH:mm:ss') as begin_time
Select count(*)和Count(1)的区别和执行方式
阿里云MaxCompute > 开发 > SQL及函数 > DQL操作(SELECT) > SELECT语法
SQL - Displaying entries that are the max of a count?(分组计数后取该组中最大) (灵活使用having
Hive取非Group by字段数据的方法 collect_set()
一个字段间比较大小小技巧(最多三个字段)
--两个字段
case when a>b then 1 else 0 end
--三个字段
case
when a!=0 and 2a-(b+c)>=0 then 1
when 2b-(a+c)>0 then 2
when 2c-(a+b)>0 then 3
else 0 end