Skip to end of metadata
Go to start of metadata

마지막 로그인 시간

SELECT cwd_user.user_name
,cwd_user.DISPLAY_NAME
,cwd_user.active
,to_date('01-01-1970', 'DD-MM-YY') + ( 1 / 24 / 60 / 60 / 1000) * ca.attribute_value AS "Last Login"

FROM cwd_user
join cwd_user_attribute ca
ON cwd_user.id = ca.user_id

WHERE ca.attribute_name = 'lastAuthenticated'
AND cwd_user.active = 'T'
ORDER BY "Last Login";


active or inactive 사용자 조회

SELECT user_name
,DISPLAY_NAME
,active


FROM cwd_user


WHERE active = 'T';
-- or WHERE active ='F';



active or inactive 사용자 수 조회

SELECT COUNT(*) AS USER_CNT


FROM cwd_user


WHERE active = 'T';
-- or WHERE active ='F';




  • No labels