-- =======================================================================
--		Lista os totais de usuários conectados.
-- =======================================================================
col status format a8
--
@cab;
--
select a.STATUS, 
       count(0) QTD
from V$SESSION a, V$PROCESS b
where a.TYPE != 'BACKGROUND'
and b.ADDR (+) = a.PADDR
group by a.STATUS;
--
set heading off;
select 'Total: ' || count(0)
from V$SESSION a, V$PROCESS b
where a.TYPE != 'BACKGROUND'
and b.ADDR (+) = a.PADDR;
set heading on;
prompt;
--
@rod;

hostgator