Wednesday, April 25, 2012

Session count for the last 3 hours



SELECT COUNT(*) FROM bblearn.SESSIONS WHERE TIMESTAMP > SYSDATE - 3/24;


select SESSION_ID  ||'|'||  user_id ||'|'||  to_char(timestamp, 'Dy DD-Mon-YYYY HH24:MI:SS')  from bblearn.sessions where timestamp > sysdate - 3/24;


delete sessions more than 3 hours

exec BBLEARN.sessions_rm(minutes=>180);

No comments:

Post a Comment