Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LDK/resources/queries/core/DistinctUsersByMonth.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ year(a.date) as year,
month(a.date) as month,
a.CreatedBy.DisplayName as user

FROM "/".auditlog.audit a
FROM "/".auditlog.UserAuditEvent a

WHERE a.EventType = 'UserAuditEvent' AND a.Comment LIKE '%logged in%'
WHERE a.Comment LIKE '%logged in%'

GROUP BY year(a.date), month(a.date), a.CreatedBy.DisplayName

Expand Down
5 changes: 2 additions & 3 deletions LDK/resources/queries/core/SiteUsageByDay.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ CASE
END as dayOfWeek,
count(*) AS Logins

FROM "/".auditlog.audit a
FROM "/".auditlog.UserAuditEvent a

WHERE a.EventType = 'UserAuditEvent'
AND a.Comment LIKE '%logged in%'
WHERE a.Comment LIKE '%logged in%'
GROUP BY cast(a.date as date)
4 changes: 2 additions & 2 deletions LDK/resources/queries/core/SiteUsageByHour.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ SELECT
hour(a.date) as Hour,
count(*) AS Visits

FROM "/".auditlog.audit a
FROM "/".auditlog.UserAuditEvent a

WHERE a.EventType = 'UserAuditEvent' AND a.Comment LIKE '%logged in%'
WHERE a.Comment LIKE '%logged in%'

GROUP BY hour(a.date)
5 changes: 2 additions & 3 deletions LDK/resources/queries/core/SiteUsageByMonth.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ month(a.date) as month,
cast(cast(year(a.date) as varchar) || '-' || cast(month(a.date) as varchar) || '-01' as DATE) as date,
count(*) AS Logins

FROM "/".auditlog.audit a
FROM "/".auditlog.UserAuditEvent a
--FROM audit_pg.auditLog a

WHERE a.EventType = 'UserAuditEvent'
AND a.Comment LIKE '%logged in%'
WHERE a.Comment LIKE '%logged in%'

GROUP BY year(a.date), month(a.date)
2 changes: 1 addition & 1 deletion LDK/resources/queries/core/SiteUsageByUser.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ PARAMETERS(MinDate TIMESTAMP)
SELECT
a.CreatedBy,
COUNT(a.Date) AS LogInCount
FROM "/".auditlog.audit a
FROM "/".auditlog.UserAuditEvent a
WHERE a.Comment LIKE '%logged in%' AND cast(a.date as date) >= cast(MinDate as date)
GROUP BY a.CreatedBy
4 changes: 2 additions & 2 deletions LDK/resources/queries/core/SiteUsagePerGroup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ a.EventType
FROM core.groups g

LEFT JOIN core.Members m ON (g.UserId = m.GroupId.UserId)
LEFT JOIN "/".auditlog.audit a
ON (a.CreatedBy.UserId = m.UserId.UserId AND a.EventType = 'UserAuditEvent' AND a.Comment LIKE '%logged in%')
LEFT JOIN "/".auditlog.UserAuditEvent a
ON (a.CreatedBy.UserId = m.UserId.UserId AND a.Comment LIKE '%logged in%')

WHERE g.Name IS NOT NULL
AND g.Name != ''
Expand Down