hive使用
一、join
left join=left outer join ----返回左表所有的行,没有值的列为null
join=inner join ----返回匹配的行
full join 返回左右表所有行
二、having
having---对由sum或其它集合函数运算结果的输出进行限制
eg:select user_id, sum(amount)/100 as amount from a
where dt='20180411'
and status=200
and order_type not in (2,5,8,9,10,11)
and to_date(updated_at) >='2018-04-03'
group by user_id
having sum(amount)/100>=5000