I have a json-type column in pinot like below:
{"value1":1, "value2":2, "value3":3}
{"value1":2, "value4":4, "value5":1}
{"value2":3, "value3":1}
now I just wanna extract the key and count the value of each key, the result is shown like below:
"value1":3
"value2":5
"value3":4
"value4":4
"value5":1
I mean there are more than 5 kinds of "values"(maybe value6, value7 ...) so how to write the corresponding sql ?
I have a json-type column in pinot like below:
{"value1":1, "value2":2, "value3":3}{"value1":2, "value4":4, "value5":1}{"value2":3, "value3":1}now I just wanna extract the key and count the value of each key, the result is shown like below:
"value1":3"value2":5"value3":4"value4":4"value5":1I mean there are more than 5 kinds of "values"(maybe value6, value7 ...) so how to write the corresponding sql ?