1 DEFINE{ query_name 'rrcx_stats_neigh_cell';
2 max_lfta_disorder '1'; max_hfta_disorder '1';
3 comment 'statistics on ssb RSRP on the beams of nrighboring cells, aggregated by 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,
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( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) -
18 sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*)
19 ) / count(*) as stddev_rsrp,
20 INT(max(rsrp))-INT(157) as max_rsrp
21 from RRCXFER.neighbor_beam_ssb
22 //where schemaId = 6 and rsrp<128
24 group by timestamp_ms/$window as tb, physCellId
27 DEFINE{ query_name 'rrcx_stats_neigh_gnb';
28 max_lfta_disorder '1'; max_hfta_disorder '1';
29 comment 'statistics on ssb RSRP on the beams of nrighboring cells, aggregated by gNB, computed using rrc transfer';
32 // rsrp, rsrq, sinr ranges are 0 .. 127
33 // to convert rsrp to dbm, subtract 157
35 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
38 INT(min(rsrp))-INT(157) as min_rsrp,
39 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
40 INT(median_of(rsrp)) - INT(157) as median_rsrp,
41 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
43 sum( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) -
44 sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*)
45 ) / count(*) as stddev_rsrp,
46 INT(max(rsrp))-INT(157) as max_rsrp
47 from RRCXFER.neighbor_beam_ssb
49 //where schemaId = 6 and rsrp<128
50 group by timestamp_ms/$window as tb, gnb_id
54 DEFINE{ query_name 'rrcx_stats_serv_cell';
55 max_lfta_disorder '1'; max_hfta_disorder '1';
56 comment 'statistics on the ssb rsrp of the serving cell, aggregated by cell id, computed using rrc transfer';
59 // rsrp, rsrq, sinr ranges are 0 .. 127
60 // to convert rsrp to dbm, subtract 157
62 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
63 physCellId as CELL_ID,
65 INT(min(rsrp))-INT(157) as min_rsrp,
66 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
67 INT(median_of(rsrp)) - INT(157) as median_rsrp,
68 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
70 sum( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) -
71 sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*)
72 ) / count(*) as stddev_rsrp,
73 INT(max(rsrp))-INT(157) as max_rsrp
74 from RRCXFER.serv_nr_cell
76 //where schemaId = 1 and rsrp<128
77 group by timestamp_ms/$window as tb, physCellId
80 DEFINE{ query_name 'rrcx_stats_neighbor_cell';
81 max_lfta_disorder '1'; max_hfta_disorder '1';
82 comment 'statistics on the ssb rsrp of the neighbor cells, aggregated by cell id, computed using rrc transfer';
85 // rsrp, rsrq, sinr ranges are 0 .. 127
86 // to convert rsrp to dbm, subtract 157
88 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
89 physCellId as CELL_ID,
91 INT(min(rsrp))-INT(157) as min_rsrp,
92 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
93 INT(median_of(rsrp)) - INT(157) as median_rsrp,
94 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
96 sum( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) -
97 sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*)
98 ) / count(*) as stddev_rsrp,
99 INT(max(rsrp))-INT(157) as max_rsrp
100 from RRCXFER.nr_neighbor
101 //where schemaId = 4 and rsrp<128
103 group by timestamp_ms/$window as tb, physCellId
107 DEFINE{ query_name 'rrcx_stats_serv_gnb';
108 max_lfta_disorder '1'; max_hfta_disorder '1';
109 comment 'statistics on the ssb srp of the serving cell, aggregated by gNB, computed using rrc transfer';
112 // rsrp, rsrq, sinr ranges are 0 .. 127
113 // to convert rsrp to dbm, subtract 157
115 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
118 INT(min(rsrp))-INT(157) as min_rsrp,
119 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
120 INT(median_of(rsrp)) - INT(157) as median_rsrp,
121 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
123 sum( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) -
124 sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*)
125 ) / count(*) as stddev_rsrp,
126 INT(max(rsrp))-INT(157) as max_rsrp
127 from RRCXFER.serv_nr_cell
128 //where schemaId = 1 and rsrp<128
130 group by timestamp_ms/$window as tb, gnb_id
133 DEFINE{ query_name 'rrcx_stats_neighbor_gnb';
134 max_lfta_disorder '1'; max_hfta_disorder '1';
135 comment 'statistics on the ssb rsrp of the neighbor cells, aggregated by gNB, computed using rrc transfer';
138 // rsrp, rsrq, sinr ranges are 0 .. 127
139 // to convert rsrp to dbm, subtract 157
141 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
144 INT(min(rsrp))-INT(157) as min_rsrp,
145 INT(quantile_of(rsrp, .05)) - INT(157) as pctl_05_rsrp,
146 INT(median_of(rsrp)) - INT(157) as median_rsrp,
147 INT(quantile_of(rsrp, .95)) - INT(157) as pctl_95_rsrp,
149 sum( (FLOAT(rsrp)-157)*(FLOAT(rsrp)-157)) -
150 sum( (FLOAT(rsrp)-157) )*sum( (FLOAT(rsrp)-157) )/count(*)
151 ) / count(*) as stddev_rsrp,
152 INT(max(rsrp))-INT(157) as max_rsrp
153 from RRCXFER.nr_neighbor
154 //where schemaId = 4 and rsrp<128
156 group by timestamp_ms/$window as tb, gnb_id