set pagesize 300

column service_name format a30

select inst_id,count(1) from gv$session group by inst_id order by inst_id;
select inst_id,service_name,count(1) from gv$session group by inst_id,service_name order by inst_id,service_name;
select inst_id,service_name,count(1) from gv$session group by service_name,inst_id order by service_name,inst_id;
