fix(chalice): fixed redundant event-names

This commit is contained in:
Taha Yassine Kraiem 2025-03-28 17:18:33 +01:00 committed by Kraiem Taha Yassine
parent 99d62fa549
commit c6a5ed6c3b

View file

@ -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