jira中统计某段时间内登录过的用户

 

参考资料:

https://community.atlassian.com/t5/Jira-questions/Users-logged-in-in-past-12-months-JIRA/qaq-p/289904

 

最终版本:

SELECT
  cwd_user.`display_name`,
  cwd_user.`user_name`,
  FROM_UNIXTIME(cwd_user_attributes.attribute_value/1000,'%Y-%m-%d %H:%i:%s') AS '最后登录时间'
FROM
  cwd_user,
  cwd_user_attributes
WHERE 
  cwd_user.`ID` = cwd_user_attributes.`user_id` 
  AND cwd_user_attributes.`attribute_name` = 'login.lastLoginMillis' 
  AND FROM_UNIXTIME(cwd_user_attributes.attribute_value/1000,'%Y-%m-%d %H:%i:%s') > '2020-01-01 00:00:00' 
  ORDER BY cwd_user_attributes.attribute_value DESC;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章