From d45fd1634d342c894fc78ba27ea2f785d008ac97 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 28 Apr 2022 14:59:05 +0200 Subject: [PATCH] feat(api): EE fixed No of pages count widget --- ee/api/chalicelib/core/metrics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/metrics.py b/ee/api/chalicelib/core/metrics.py index 111671a01..2d6aa7201 100644 --- a/ee/api/chalicelib/core/metrics.py +++ b/ee/api/chalicelib/core/metrics.py @@ -2476,7 +2476,8 @@ def __get_user_activity_avg_visited_pages(ch, project_id, startTimestamp, endTim ch_query = f"""SELECT COALESCE(CEIL(avgOrNull(count)),0) AS value FROM (SELECT COUNT(session_id) AS count FROM pages {"INNER JOIN sessions_metadata USING(session_id)" if len(meta_condition) > 0 else ""} - WHERE {" AND ".join(ch_sub_query)}) AS groupped_data + WHERE {" AND ".join(ch_sub_query)} + GROUP BY session_id) AS groupped_data WHERE count>0;""" params = {"project_id": project_id, "startTimestamp": startTimestamp, "endTimestamp": endTimestamp, **__get_constraint_values(args)}