Adding additional KPIs, adding required documentation
[ric-app/mc.git] / mc-core / mc / queries / rrcx_pdf_cell.gsql
1
2 DEFINE{ query_name 'rrcx_pdf_neigh_cell_csi'; 
3         max_lfta_disorder '1'; max_hfta_disorder '1';
4 }
5 PARAM{ window uint;}
6 //      rsrp, rsrq, sinr ranges are 0 .. 127
7 //      for now divide into 5 bins.
8
9 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
10         physCellId as CELL_ID,
11         count(*) as cnt,
12         sum(GEQ(rsrp, 0)*LEQ(rsrp,37)) as rsrp_vbad,
13         sum(GEQ(rsrp,38)*LEQ(rsrp,52)) as rsrp_bad,
14         sum(GEQ(rsrp,52)*LEQ(rsrp,67)) as rsrp_medium,
15         sum(GEQ(rsrp,68)*LEQ(rsrp,82)) as rsrp_good,
16         sum(GEQ(rsrp,83)*LEQ(rsrp,127)) as rsrp_vgood
17 from RRCXFER.neighbor_beam_csi
18 where schemaId = 5
19 group by timestamp_ms/$window as tb, physCellId
20 ;
21
22 DEFINE{ query_name 'rrcx_pdf_neigh_gnb_csi'; 
23         max_lfta_disorder '1'; max_hfta_disorder '1';
24 }
25 PARAM{ window uint;}
26 //      rsrp, rsrq, sinr ranges are 0 .. 127
27 //      for now divide into 5 bins.
28
29 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
30         gnb_id as GNB_ID,
31         count(*) as cnt,
32         sum(GEQ(rsrp, 0)*LEQ(rsrp,37)) as rsrp_vbad,
33         sum(GEQ(rsrp,38)*LEQ(rsrp,52)) as rsrp_bad,
34         sum(GEQ(rsrp,52)*LEQ(rsrp,67)) as rsrp_medium,
35         sum(GEQ(rsrp,68)*LEQ(rsrp,82)) as rsrp_good,
36         sum(GEQ(rsrp,83)*LEQ(rsrp,127)) as rsrp_vgood
37 from RRCXFER.neighbor_beam_csi
38 where schemaId = 5
39 group by timestamp_ms/$window as tb, gnb_id
40 ;
41
42
43 DEFINE{ query_name 'rrcx_pdf_neigh_cell_ssb'; 
44         max_lfta_disorder '1'; max_hfta_disorder '1';
45 }
46 PARAM{ window uint;}
47 //      rsrp, rsrq, sinr ranges are 0 .. 127
48 //      for now divide into 5 bins.
49
50 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
51         physCellId as CELL_ID,
52         count(*) as cnt,
53         sum(GEQ(rsrp, 0)*LEQ(rsrp,37)) as rsrp_vbad,
54         sum(GEQ(rsrp,38)*LEQ(rsrp,52)) as rsrp_bad,
55         sum(GEQ(rsrp,52)*LEQ(rsrp,67)) as rsrp_medium,
56         sum(GEQ(rsrp,68)*LEQ(rsrp,82)) as rsrp_good,
57         sum(GEQ(rsrp,83)*LEQ(rsrp,127)) as rsrp_vgood
58 from RRCXFER.neighbor_beam_ssb
59 where schemaId = 5
60 group by timestamp_ms/$window as tb, physCellId
61 ;
62
63 DEFINE{ query_name 'rrcx_pdf_neigh_gnb_ssb'; 
64         max_lfta_disorder '1'; max_hfta_disorder '1';
65 }
66 PARAM{ window uint;}
67 //      rsrp, rsrq, sinr ranges are 0 .. 127
68 //      for now divide into 5 bins.
69
70 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
71         gnb_id as GNB_ID,
72         count(*) as cnt,
73         sum(GEQ(rsrp, 0)*LEQ(rsrp,37)) as rsrp_vbad,
74         sum(GEQ(rsrp,38)*LEQ(rsrp,52)) as rsrp_bad,
75         sum(GEQ(rsrp,52)*LEQ(rsrp,67)) as rsrp_medium,
76         sum(GEQ(rsrp,68)*LEQ(rsrp,82)) as rsrp_good,
77         sum(GEQ(rsrp,83)*LEQ(rsrp,127)) as rsrp_vgood
78 from RRCXFER.neighbor_beam_ssb
79 where schemaId = 5
80 group by timestamp_ms/$window as tb, gnb_id
81 ;
82
83
84
85 DEFINE{ query_name 'rrcx_pdf_serv_cell'; 
86         max_lfta_disorder '1'; max_hfta_disorder '1';
87 }
88 PARAM{ window uint;}
89 //      rsrp, rsrq, sinr ranges are 0 .. 127
90 //      for now divide into 5 bins.
91
92 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
93         physCellId as CELL_ID,
94         count(*) as cnt,
95         sum(GEQ(rsrp, 0)*LEQ(rsrp,21)) as rsrp_vbad,
96         sum(GEQ(rsrp,22)*LEQ(rsrp,36)) as rsrp_bad,
97         sum(GEQ(rsrp,37)*LEQ(rsrp,51)) as rsrp_medium,
98         sum(GEQ(rsrp,52)*LEQ(rsrp,66)) as rsrp_good,
99         sum(GEQ(rsrp,67)*LEQ(rsrp,127)) as rsrp_vgood
100 from RRCXFER.serv_nr_cell
101 where schemaId = 1
102 group by timestamp_ms/$window as tb, physCellId
103 ;
104
105 DEFINE{ query_name 'rrcx_pdf_neighbor_cell'; 
106         max_lfta_disorder '1'; max_hfta_disorder '1';
107 }
108 PARAM{ window uint;}
109 //      rsrp, rsrq, sinr ranges are 0 .. 127
110 //      for now divide into 5 bins.
111
112 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
113         physCellId as CELL_ID,
114         count(*) as cnt,
115         sum(GEQ(rsrp, 0)*LEQ(rsrp,21)) as rsrp_vbad,
116         sum(GEQ(rsrp,22)*LEQ(rsrp,36)) as rsrp_bad,
117         sum(GEQ(rsrp,37)*LEQ(rsrp,51)) as rsrp_medium,
118         sum(GEQ(rsrp,52)*LEQ(rsrp,66)) as rsrp_good,
119         sum(GEQ(rsrp,67)*LEQ(rsrp,127)) as rsrp_vgood
120 from RRCXFER.nr_neighbor
121 where schemaId = 4
122 group by timestamp_ms/$window as tb, physCellId
123 ;
124
125
126 DEFINE{ query_name 'rrcx_pdf_serv_gnb'; 
127         max_lfta_disorder '1'; max_hfta_disorder '1';
128 }
129 PARAM{ window uint;}
130 //      rsrp, rsrq, sinr ranges are 0 .. 127
131 //      for now divide into 5 bins.
132
133 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
134         gnb_id as GNB_ID,
135         count(*) as cnt,
136         sum(GEQ(rsrp, 0)*LEQ(rsrp,21)) as rsrp_vbad,
137         sum(GEQ(rsrp,22)*LEQ(rsrp,36)) as rsrp_bad,
138         sum(GEQ(rsrp,37)*LEQ(rsrp,51)) as rsrp_medium,
139         sum(GEQ(rsrp,52)*LEQ(rsrp,66)) as rsrp_good,
140         sum(GEQ(rsrp,67)*LEQ(rsrp,127)) as rsrp_vgood
141 from RRCXFER.serv_nr_cell
142 where schemaId = 1
143 group by timestamp_ms/$window as tb, gnb_id
144 ;
145
146 DEFINE{ query_name 'rrcx_pdf_neighbor_gnb'; 
147         max_lfta_disorder '1'; max_hfta_disorder '1';
148 }
149 PARAM{ window uint;}
150 //      rsrp, rsrq, sinr ranges are 0 .. 127
151 //      for now divide into 5 bins.
152
153 select ($window*(tb+1))/1000 as TS, $window/1000.0 as measurementInterval,
154         gnb_id as GNB_ID,
155         count(*) as cnt,
156         sum(GEQ(rsrp, 0)*LEQ(rsrp,21)) as rsrp_vbad,
157         sum(GEQ(rsrp,22)*LEQ(rsrp,36)) as rsrp_bad,
158         sum(GEQ(rsrp,37)*LEQ(rsrp,51)) as rsrp_medium,
159         sum(GEQ(rsrp,52)*LEQ(rsrp,66)) as rsrp_good,
160         sum(GEQ(rsrp,67)*LEQ(rsrp,127)) as rsrp_vgood
161 from RRCXFER.nr_neighbor
162 where schemaId = 4
163 group by timestamp_ms/$window as tb, gnb_id
164
165