SQL Query to find Session In Oracle Database Not Active from 30 mins

Query
SELECT s.sid,
       s.serial#,
       s.username,
       s.machine,
       s.program,
       s.status,
       s.osuser,
       s.logon_time,
       s.last_call_et AS "Elapsed Time (sec)",
       t.sql_text
FROM   v$session s
JOIN   v$sqltext t ON s.sql_address = t.address
WHERE  s.type != 'BACKGROUND'
AND    s.status = 'INACTIVE'
AND    s.last_call_et > 1800; -- 30 minutes in seconds




If you like please follow and comment