Select distinct
trunc(sessions.starttime) as date,
comp.name,
comp.HC,
sessions.ctype,
count (sessions.userid)
from
S_USERSESSION sessions,
S_USER users,
S_COMPANY comp
where
sessions.userid = users.userid and
users.companyid = comp.companyid and
sessions.starttime > trunc(sysdate) - 10 AND
sessions.passwordverified='Y'
group by
date,clienttype,sessions.userid,comp.name,comp.holdingcompanyid
StartTime company HC CTYPE COUNT
2005-11-29 A 107 0 1
2005-11-29 A 107 0 1
2005-11-29 D 107 0 1
2005-11-29 c null 0 1
2005-11-29 c null 0 1
2005-8-29 B null 0 1
2005-8-29 B null 0 1
2005-8-29 B null 0 1
I would like to get this result
dealer has HC field no equal Null.
Results
StartTime Cliente Dealer COUNT
2005-11-29 3 2 5
2005-8-29 3 0 3
Thanks for any help
trunc(sessions.starttime) as date,
comp.name,
comp.HC,
sessions.ctype,
count (sessions.userid)
from
S_USERSESSION sessions,
S_USER users,
S_COMPANY comp
where
sessions.userid = users.userid and
users.companyid = comp.companyid and
sessions.starttime > trunc(sysdate) - 10 AND
sessions.passwordverified='Y'
group by
date,clienttype,sessions.userid,comp.name,comp.holdingcompanyid
StartTime company HC CTYPE COUNT
2005-11-29 A 107 0 1
2005-11-29 A 107 0 1
2005-11-29 D 107 0 1
2005-11-29 c null 0 1
2005-11-29 c null 0 1
2005-8-29 B null 0 1
2005-8-29 B null 0 1
2005-8-29 B null 0 1
I would like to get this result
dealer has HC field no equal Null.
Results
StartTime Cliente Dealer COUNT
2005-11-29 3 2 5
2005-8-29 3 0 3
Thanks for any help