IMPALA取时间月份差

select * from good_user_04 a where user_state in ('申请停机','申请停,欠费双停')    and months_between(to_timestamp(a.last_stop_time,'yyyyMMddHHmmss'),to_timestamp(a.open_date,'yyyyMMddHHmmss')) <=12;

猜你喜欢

转载自blog.csdn.net/zcb_data/article/details/89083564