22,209
社区成员
发帖
与我相关
我的任务
分享
SELECT A1.*
FROM hacref.session AS A1
JOIN hacconf.user AS A2 ON (A1.username=A2.username)
JOIN hacconf.orgunit AS A3 ON (A2.ou_id=A3.ID)
JOIN hacconf.device AS A4 ON (A1.serverIP=A4.IP AND A4.OU_ID=A3.ID)
WHERE (A3.OU_ID & (select ou_id from hacconf.orgunit where id=4)) =
(select ou_id from hacconf.orgunit where id=4)