From 31cd192f247ab6719ce4b20965d5e6b0bf8eb514 Mon Sep 17 00:00:00 2001 From: Shivanshu Raj Shrivastava Date: Sun, 1 Jun 2025 22:48:01 +0530 Subject: [PATCH] fix: fix clickhouse query Signed-off-by: Shivanshu Raj Shrivastava --- pkg/modules/tracefunnel/clickhouse_queries.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/modules/tracefunnel/clickhouse_queries.go b/pkg/modules/tracefunnel/clickhouse_queries.go index 4dd5c23189..17123ce5a5 100644 --- a/pkg/modules/tracefunnel/clickhouse_queries.go +++ b/pkg/modules/tracefunnel/clickhouse_queries.go @@ -722,7 +722,7 @@ SELECT FROM ( SELECT countIf(t1_time > 0 AND t2_time > t1_time) AS total_s2_spans, - countIf(t1_time > 0 AND t2_time > t1_time) AS total_s1_spans, -- eligible only + countIf(t1_time > 0) AS total_s1_spans, -- eligible only sum(s1_error) AS sum_s1_error, sum(s2_error) AS sum_s2_error, avgIf((toUnixTimestamp64Nano(t2_time) - toUnixTimestamp64Nano(t1_time)) / 1e6, t1_time > 0 AND t2_time > t1_time) AS avg_duration_12, @@ -741,7 +741,7 @@ SELECT FROM ( SELECT countIf(t2_time > 0 AND t3_time > t2_time) AS total_s3_spans, - countIf(t2_time > 0 AND t3_time > t2_time) AS total_s2_spans, -- eligible only + countIf(t2_time > 0) AS total_s2_spans, -- eligible only sum(s2_error) AS sum_s2_error, sum(s3_error) AS sum_s3_error, avgIf((toUnixTimestamp64Nano(t3_time) - toUnixTimestamp64Nano(t2_time)) / 1e6, t2_time > 0 AND t3_time > t2_time) AS avg_duration_23,