From c6a5ed6c3b7ed1f85918335074948304e3bf5ce4 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 28 Mar 2025 17:18:33 +0100 Subject: [PATCH] fix(chalice): fixed redundant event-names --- api/chalicelib/core/product_analytics/events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/chalicelib/core/product_analytics/events.py b/api/chalicelib/core/product_analytics/events.py index 895f2e407..41363e7c6 100644 --- a/api/chalicelib/core/product_analytics/events.py +++ b/api/chalicelib/core/product_analytics/events.py @@ -12,7 +12,8 @@ logger = logging.getLogger(__name__) def get_events(project_id: int, page: schemas.PaginatedSchema): with ClickHouseClient() as ch_client: r = ch_client.format( - """SELECT COUNT(1) OVER () AS total, + """SELECT DISTINCT ON(event_name,auto_captured) + COUNT(1) OVER () AS total, event_name AS name, display_name, description, auto_captured FROM product_analytics.all_events