select s.username username,s.serial# serial,se.sid,n.name,
max(se.value) maxmem
from v$sesstat se,
v$statname n,
v$session s
where n.statistic# = se.statistic#
and s.sid=se.sid
and s.username is not null
group by n.name,se.sid,s.username,s.serial#
order by 2
转载于:https://www.cnblogs.com/czjie/archive/2011/11/16/2251939.html