20101013 just give me the numbers - plembo/onemoretech GitHub Wiki

title: Just give me the numbers! link: https://onemoretech.wordpress.com/2010/10/13/just-give-me-the-numbers/ author: lembobro description: post_id: 118 created: 2010/10/13 14:02:00 created_gmt: 2010/10/13 14:02:00 comment_status: open post_name: just-give-me-the-numbers status: publish post_type: post

Just give me the numbers!

Someone wanted to get the raw totals of logins for such-and-such a month that came through an Oracle Application Server 10g SSO environment.

After logging into the infrastructure database with sqlplus as the ORASSO schema owner, I executed the following query:

SQL> select count(*) as "Number of logins"
 2 from orasso.wwsso_audit_log_table_t
 3 where ACTION = 'LOGIN' and
 4 LOG_DATE like '%-SEP-10';
	
Number of logins
----------------
         1027552

Of course that count made up, it’s not a real number from an actual system.

A daily report could be generated with something like this (found in this article):

SQL> select TO_CHAR(log_date, 'YYYY-MM-DD')
2 "Login date", COUNT(*) "Number of Logins"
3 from orasso.wwsso_audit_log_table_t
4 group by TO_CHAR(log_date, 'YYYY-MM-DD'
5 ORDER BY 1;

Copyright 2004-2019 Phil Lembo