set define on set numwidth 16 col username format a15 col machine format a30 col sysdate format a21 Select count(*) , username , machine from gv$session where username = upper('&1') group by username,machine / set define off