From 5a29c7ede2537dfa1597fa1be679aa3836213fdc Mon Sep 17 00:00:00 2001 From: Melchior Reimers Date: Sun, 25 Jan 2026 14:41:20 +0100 Subject: [PATCH] Fix GROUP BY clause for QuestDB - use full expressions instead of aliases --- dashboard/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/server.py b/dashboard/server.py index 0b2a9ff..8c8ccb3 100644 --- a/dashboard/server.py +++ b/dashboard/server.py @@ -137,9 +137,9 @@ async def get_analytics( cont_list = ",".join([f"'{c.strip()}'" for c in continents.split(",")]) query += f" and {m_prefix}continent in ({cont_list})" - query += " group by label" + query += f" group by {selected_group}" if sub_group_by and sub_group_by in groups_map: - query += ", sub_label" + query += f", {groups_map[sub_group_by]}" query += " order by label asc"