From 4970bc365bbf7a37fde0aabdf514df236c6c1a5f Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Tue, 18 Feb 2025 18:28:30 +0100 Subject: [PATCH] fix(chalice): fixed product analytics query issue for old CH version (#3044) --- api/chalicelib/core/metrics/product_analytics_ch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/chalicelib/core/metrics/product_analytics_ch.py b/api/chalicelib/core/metrics/product_analytics_ch.py index 8425e7a77..c19542ede 100644 --- a/api/chalicelib/core/metrics/product_analytics_ch.py +++ b/api/chalicelib/core/metrics/product_analytics_ch.py @@ -428,7 +428,7 @@ def path_analysis(project_id: int, data: schemas.CardPathAnalysis): SELECT event_number_in_session, `$event_name`, e_value, - SUM(sessions_count) AS sessions_count + SUM(n{i}.sessions_count) AS sessions_count FROM n{i} GROUP BY event_number_in_session, `$event_name`, e_value ORDER BY sessions_count DESC @@ -594,7 +594,7 @@ FROM ranked_events NULL AS e_value, 'OTHER' AS next_type, NULL AS next_value, - SUM(sessions_count) AS sessions_count + SUM(others_n.sessions_count) AS sessions_count FROM others_n WHERE isNotNull(others_n.next_type) AND others_n.event_number_in_session < %(density)s