Fix users count

This commit is contained in:
Jan Kvetina 2021-12-24 11:41:09 +01:00
parent e383ae2149
commit a5b0b5bcd8

View File

@ -5,9 +5,9 @@ SELECT
--
MAX(LTRIM(s.object_name || '.' || s.procedure_name, '.')) AS auth_procedure,
--
NULLIF(COUNT(p.page_id), 0) AS count_pages,
NULL AS count_regions,
NULLIF(COUNT(u.user_id), 0) AS count_users,
NULLIF(COUNT(p.page_id), 0) AS count_pages,
NULL AS count_regions,
NULLIF(COUNT(DISTINCT u.user_id), 0) AS count_users,
--
MAX(CASE WHEN a.caching = 'Once per session' THEN 'Y' END) AS cache_session,
MAX(CASE WHEN a.caching = 'Once per page view' THEN 'Y' END) AS cache_page_view,