Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article offers examples for a user administration related analyses with the dashboard.

...

Number of created and total users per month

Code Block
languagesql
SELECT
concat(DATEPART(yy, ident.creationTime),'-', DATEPART(mm, ident.creationTime)) AS Month,
SUM(1) AS Number,
(SELECT
COUNT(*) FROM view_identity
WHERE identitytype = 'USER' AND
concat(DATEPART(yy, creationTime),'-', DATEPART(mm, creationTime)) <= concat(DATEPART(yy, ident.creationTime),'-', DATEPART(mm, ident.creationTime))
) AS Total
FROM view_identity ident WHERE identitytype = 'USER'
GROUP BY concat(DATEPART(yy, ident.creationTime),'-', DATEPART(mm, ident.creationTime));