АЦК. Сессии пользователей
-- количество сессий по СП/tomcat SELECT COUNT ( * ) , server_host , server_port FROM usersession WHERE close_time IS NULL AND sysuser_id <> - 99999 GROUP BY server_host , server_port ORDER BY server_port; -- всего пользователей SELECT COUNT ( * ) FROM usersession WHERE close_time IS NULL AND sysuser_id <> - 99999 ; /* Открыть сессии пользователя (Сервис - ...) */ select s.id, sysuser_id, budget_id, work_date, server_host, server_port, client_host, client_port, open_time, usacc.access_time, usacc.request_count, b.caption, u.username, o.caption org_caption, u.realname, s.auth_types from usersession s left join usersessionaccess usacc on usacc.id = s.id left join budget b on b.id = budget_id left join sysuser u on u.id = s.sysuser_id left join org o on o.id = u.org_id where close_time is NULL AND u.id in (select s.id from sysuser s where s.username ='777021_1'); /* Просто таблица с сессиями */ select c