我在STRING字段中有这种日志,它有7种不同的类别:
RB03, RV02, EV1, EV2, EV3, EV4, EV8
日志条目:
message:35793179,5/16/2018 9:25,75,14472,RV02,1100110181,2.3.5,1E002D070C38,OFF
message:35793151,5/16/2018 9:25,142,15852,RB03,1100110251,2.3.a,CWDCOIN00001,1.1
message:35792553,5/16/2018 9:11,290,31980,EV1,,,,
message:35792577,5/16/2018 9:11,84,10570,EV2,,,,
message:35792545,5/16/2018 9:01,295,31980,EV3,,,,
message:357925344,5/16/2018 9:13,294,31980,EV4,,,,
message:35792523,5/16/2018 9:11,267,31980,EV8,,,,
我必须计算所有7个类别,如下所示进行计算,并找出百分比。
PERCENTAGE = [counts of RB03 - [counts of RV02 + counts of EV1 + counts of EV2 +
counts of EV3 + counts of EV4 + counts of EV8] / count of RB03] * 100
我不知道该怎么做,在搜索中,我发现有关脚本字段的信息,也许可以做到这一点。