+SELECT ($window*(TB+1))/1000 as TS, GNB_ID, gTP_TEID,
+ $window/1000.0 as measurementInterval, // standard_name
+ MIN(connected_time)/1000.0 as min_connected_time,
+ MAX(connected_time)/1000.0 as max_connected_time,
+ AVG(connected_time)/1000.0 as avg_connected_time,
+ quantile_of(connected_time, .05)/1000.0 as pctl_05_connected_time,
+ quantile_of(connected_time, .95)/1000.0 as pctl_95_connected_time,
+ sqrt(
+ sum((connected_time/1000.0)*(connected_time/1000.0)) - sum(connected_time/1000.0)*sum(connected_time/1000.0)/count(*)
+ ) / count(*) as stddev_connected_time
+FROM mc_disconnected_gtp_teids
+GROUP BY TB, GNB_ID, gTP_TEID
+;
+
+
+
+
+DEFINE{ query_name 'mc_connects_cnt';
+ max_lfta_disorder '1'; max_hfta_disorder '1';
+ comment 'number of DC connection requests, by GNB';
+}
+PARAM{ window uint; }
+SELECT ($window*(TB+1))/1000 as TS, GNB_ID,