1 DEFINE{ query_name 'rrcx_stats_serv_beam_cell';
2 max_lfta_disorder '1'; max_hfta_disorder '1';
3 comment 'statistics on ssb RSRP on the beams of serving cells, aggregated by gbn_id / cell ID, computed using rrc transfer';
6 // rsrp, rsrq, sinr ranges are 0 .. 127
7 // to convert rsrp to dbm, subtract 157
9 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
10 physCellId as CELL_ID, gnb_id as GNB_ID,
12 INT(min(rsrp))-INT(157) as min_rsrp,
13 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
14 INT(median_of(rsrp)) - INT(157) as median_rsrp,
15 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
17 sum( (rsrp-157.0)*(rsrp-157.0)) -
18 sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*)
19 ) / count(*) as stddev_rsrp,
20 INT(max(rsrp))-INT(157) as max_rsrp
21 from RRCXFER.serv_cell_beam_ssb
23 group by timestamp_ms/$window as tb, physCellId, gnb_id
26 DEFINE{ query_name 'rrcx_stats_serv_beam_gnb';
27 max_lfta_disorder '1'; max_hfta_disorder '1';
28 comment 'statistics on ssb RSRP on the beams of serving cells, aggregated by gbn_id / cell ID, computed using rrc transfer';
31 // rsrp, rsrq, sinr ranges are 0 .. 127
32 // to convert rsrp to dbm, subtract 157
34 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
37 INT(min(rsrp))-INT(157) as min_rsrp,
38 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
39 INT(median_of(rsrp)) - INT(157) as median_rsrp,
40 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
42 sum( (rsrp-157.0)*(rsrp-157.0)) -
43 sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*)
44 ) / count(*) as stddev_rsrp,
45 INT(max(rsrp))-INT(157) as max_rsrp
46 from RRCXFER.serv_cell_beam_ssb
48 group by timestamp_ms/$window as tb, gnb_id
52 DEFINE{ query_name 'rrcx_stats_neighbor_beam_cell';
53 max_lfta_disorder '1'; max_hfta_disorder '1';
54 comment 'statistics on ssb RSRP on the beams of neighboring cells, aggregated by gbn_id / cell ID, computed using rrc transfer';
57 // rsrp, rsrq, sinr ranges are 0 .. 127
58 // to convert rsrp to dbm, subtract 157
60 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
61 physCellId as CELL_ID, gnb_id as GNB_ID,
63 INT(min(rsrp))-INT(157) as min_rsrp,
64 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
65 INT(median_of(rsrp)) - INT(157) as median_rsrp,
66 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
68 sum( (rsrp-157.0)*(rsrp-157.0)) -
69 sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*)
70 ) / count(*) as stddev_rsrp,
71 INT(max(rsrp))-INT(157) as max_rsrp
72 from RRCXFER.neighbor_beam_ssb
74 group by timestamp_ms/$window as tb, physCellId, gnb_id
77 DEFINE{ query_name 'rrcx_stats_neighbor_beam_gnb';
78 max_lfta_disorder '1'; max_hfta_disorder '1';
79 comment 'statistics on ssb RSRP on the beams of nrighboring cells, aggregated by gNB, computed using rrc transfer';
82 // rsrp, rsrq, sinr ranges are 0 .. 127
83 // to convert rsrp to dbm, subtract 157
85 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
88 INT(min(rsrp))-INT(157) as min_rsrp,
89 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
90 INT(median_of(rsrp)) - INT(157) as median_rsrp,
91 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
93 sum( (rsrp-157.0)*(rsrp-157.0)) -
94 sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*)
95 ) / count(*) as stddev_rsrp,
96 INT(max(rsrp))-INT(157) as max_rsrp
97 from RRCXFER.neighbor_beam_ssb
99 group by timestamp_ms/$window as tb, gnb_id
103 DEFINE{ query_name 'rrcx_stats_serv_cell';
104 max_lfta_disorder '1'; max_hfta_disorder '1';
105 comment 'statistics on the ssb rsrp of the serving cell, aggregated by gnb_id / cell id, computed using rrc transfer';
108 // rsrp, rsrq, sinr ranges are 0 .. 127
109 // to convert rsrp to dbm, subtract 157
111 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
112 physCellId as CELL_ID, gnb_id as GNB_ID,
114 INT(min(rsrp))-INT(157) as min_rsrp,
115 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
116 INT(median_of(rsrp)) - INT(157) as median_rsrp,
117 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
119 sum( (rsrp-157.0)*(rsrp-157.0) ) -
120 sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*)
121 ) / count(*) as stddev_rsrp,
122 INT(max(rsrp))-INT(157) as max_rsrp
123 from RRCXFER.serv_nr_cell
125 group by timestamp_ms/$window as tb, physCellId, gnb_id
128 DEFINE{ query_name 'rrcx_stats_neighbor_cell';
129 max_lfta_disorder '1'; max_hfta_disorder '1';
130 comment 'statistics on the ssb rsrp of the neighbor cells, aggregated by gnb_id / cell id, computed using rrc transfer';
133 // rsrp, rsrq, sinr ranges are 0 .. 127
134 // to convert rsrp to dbm, subtract 157
136 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
137 physCellId as CELL_ID, gnb_id as GNB_ID,
139 INT(min(rsrp))-INT(157) as min_rsrp,
140 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
141 INT(median_of(rsrp)) - INT(157) as median_rsrp,
142 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
144 sum( (rsrp-157.0)*(rsrp-157.0)) -
145 sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*)
146 ) / count(*) as stddev_rsrp,
147 INT(max(rsrp))-INT(157) as max_rsrp
148 from RRCXFER.nr_neighbor
150 group by timestamp_ms/$window as tb, physCellId, gnb_id
154 DEFINE{ query_name 'rrcx_stats_serv_gnb';
155 max_lfta_disorder '1'; max_hfta_disorder '1';
156 comment 'statistics on the ssb srp of the serving cell, aggregated by gNB, computed using rrc transfer';
159 // rsrp, rsrq, sinr ranges are 0 .. 127
160 // to convert rsrp to dbm, subtract 157
162 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
165 INT(min(rsrp))-INT(157) as min_rsrp,
166 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
167 INT(median_of(rsrp)) - INT(157) as median_rsrp,
168 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
170 sum( (rsrp-157.0)*(rsrp-157.0)) -
171 sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*)
172 ) / count(*) as stddev_rsrp,
173 INT(max(rsrp))-INT(157) as max_rsrp
174 from RRCXFER.serv_nr_cell
176 group by timestamp_ms/$window as tb, gnb_id
179 DEFINE{ query_name 'rrcx_stats_neighbor_gnb';
180 max_lfta_disorder '1'; max_hfta_disorder '1';
181 comment 'statistics on the ssb rsrp of the neighbor cells, aggregated by gNB, computed using rrc transfer';
184 // rsrp, rsrq, sinr ranges are 0 .. 127
185 // to convert rsrp to dbm, subtract 157
187 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
190 INT(min(rsrp))-INT(157) as min_rsrp,
191 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
192 INT(median_of(rsrp)) - INT(157) as median_rsrp,
193 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
195 sum( (rsrp-157.0)*(rsrp-157.0)) -
196 sum( rsrp-157.0 )*sum( rsrp-157.0 )/count(*)
197 ) / count(*) as stddev_rsrp,
198 INT(max(rsrp))-INT(157) as max_rsrp
199 from RRCXFER.nr_neighbor
200 //where schemaId = 4 and rsrp<128
202 group by timestamp_ms/$window as tb, gnb_id