Table of Contents

Administrative Analyses

Number of created and total users per month

SELECT 
  concat(to_char(iden.creationtime,'yy'), to_char(iden.creationtime,'mm')) AS Monat,
  SUM(1) AS Anzahl,
    (SELECT 
    COUNT(*) FROM view_identity 
    WHERE identitytype = 'USER' AND 
    concat(to_char(creationtime,'yy'), to_char(creationtime,'mm')) <= concat(to_char(iden.creationtime,'yy'), to_char(iden.creationtime,'mm')) 
  ) AS Gesamt
  FROM view_identity iden WHERE identitytype = 'USER'
 
GROUP BY concat(to_char(iden.creationtime,'yy'), to_char(iden.creationtime,'mm'))