Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Monthly logins
OSHA_ICT_team_member_1_(oshauser1_-_(deleted))
I'd need a query that would help to get the number of logins each month, without listing users by name or by date ... Just to get the number of login. Thanks a lot!
Find more posts tagged with
Comments
***_****_(citlon01admin_-_(deleted))
Try this SQL for Oracle.select TO_CHAR(T1.AUDITDATE ,'YYYY-MM') YearMonth, Count(event) from DAUDIT T1 where T1.EVENT='LOGIN'group by TO_CHAR(T1.AUDITDATE ,'YYYY-MM')make an Auto LiveReport and specify the two display columns as the YearMonth and Count(event)Hope this helps ... David LoffhagenCity on London
Dana_Leach
Lila,The following code will give you the number of logins grouped by month(using Oracle). Let me know if you need any more info. This is total logins not logins by distinct users (if you want that info just add the keyword distinct in front of useridselect to_char(auditdate,'YYYY/MM') as "Year & Month", count(userid) as "Count" from daudit where auditdate between '01-JAN-02' and '30-SEP-02' and event = 'LOGIN' group by to_char(auditdate,'YYYY/MM') order by 1
Theresa__Jauregui_(ApolloAdmin_(Delete)_1391243)
Thanks for sharing that report. You said to add distinct before userid to get info for logins by distinct users per month. Can you just verify, will this get me the total of all users who logged in at least once to the system during each month?
Steve_McDonough
Theresa,I use the 'distinct' command in a report to create a bar chart of the number of members who have logged in at least once in a month. Here is the MS SQL statment that creates the bar chart: SELECT SUBSTRING(CONVERT(CHAR,AUDITDATE,104), 4, 7) "Month", COUNT(DISTINCT(USERID)) "No. of users" FROM DAUDIT WHERE EVENT="LOGIN" GROUP BY SUBSTRING(CONVERT(CHAR, AUDITDATE, 104), 4, 7)You should use the Oracle syntax provided earlier in the thread to format the 'month'. Use David's 'Count' command and add the extra element.Hope that this helps,Leon
Dana_Leach
Theresa, Sorry for the delay. Using distinct operator will give a single count for any user regardless of the number of times that they logged in during the period you are reporting on.Bill