TMACUL

How can I do a query for counting logged users?

Blog Post created by TMACUL Champion on Dec 23, 2015
select cnt.last_name, dateadd(ss, s.login_time, '19700101')login, dateadd(ss, s.logout_time, '19700101') logout

from session_log as s

inner join  ca_contact as cnt on s.contact = cnt.contact_uuid

where s.logout_time is  null

order by login_time desc

Outcomes