|
-- span_metrics_10m_mvCREATE MATERIALIZED VIEW IF NOT EXISTS '{database}'.span_metrics_10m_mv_local on cluster '{cluster}' TO '{database}'.span_metrics_10m_localASSELECT a.serviceName as serviceName, a.spanName as spanName, a.kind as kind, a.statusCode as statusCode, toStartOfTenMinutes(a.timeBucket) as timeBucket, sum(a.count) as count, sum(a.timeSum) as timeSum, max(a.timeMax) as timeMax, min(a.timeMin) as timeMinFROM '{database}'.span_metrics_30s_local as aGROUP BY a.serviceName, a.spanName, a.kind, a.statusCode, toStartOfTenMinutes(a.timeBucket);
|
|