select * from c_user_info
where role_id=5
and user_id in(
select distinct user_id
from tap_c_sys_log_tbl
where cast(log_datetime as date format 'YYYYMMDD')>='20141201'
)
where role_id=5
and user_id in(
select distinct user_id
from tap_c_sys_log_tbl
where cast(log_datetime as date format 'YYYYMMDD')>='20141201'
)