From d8ec792a883a5ef5ba1157734d8e909ea0d25254 Mon Sep 17 00:00:00 2001 From: Junaid Saeed Uppal Date: Wed, 25 Feb 2026 22:56:53 +0500 Subject: [PATCH] fix UNION ALL ORDER BY using positional references for ClickHouse --- app/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/db.py b/app/db.py index 77b224e28..031b8b50d 100644 --- a/app/db.py +++ b/app/db.py @@ -642,7 +642,7 @@ def get_pattern_analysis() -> dict: UNION ALL SELECT 'C', hand_type_c, count() FROM games WHERE hand_type_c > 0 GROUP BY hand_type_c - ORDER BY chair, ht + ORDER BY 1, 2 """) hand_types_by_chair = {"A": {}, "B": {}, "C": {}} for row in ht_result.result_rows: