select count(distinct(login_time)) from sys.sysprocesses

select * from sys.sysprocesses
WHERE loginame = 'ba'

select hostname,COUNT(*) from sys.sysprocesses
WHERE loginame = 'ba'
group BY hostname