diff --git a/ee/api/debug_ch_queries.py b/ee/api/debug_ch_queries.py index 36c46db420c9c..5599b52a8cf5f 100644 --- a/ee/api/debug_ch_queries.py +++ b/ee/api/debug_ch_queries.py @@ -31,8 +31,12 @@ def list(self, request): response = sync_execute( """ SELECT - query_id, argMax(query, type), argMax(query_start_time, type), argMax(exception, type), - argMax(query_duration_ms, type), max(type) AS status + query_id, + argMax(query, type) AS query, + argMax(query_start_time, type) AS query_start_time, + argMax(exception, type) AS exception, + argMax(query_duration_ms, type) AS query_duration_ms, + max(type) AS status FROM ( SELECT query_id, query, query_start_time, exception, query_duration_ms, toInt8(type) AS type