I have a column of type jSONB that have data like this:
column name: used_filters
row number 1 example:
{ "categories" : ["economic", "Social"], "tags": ["world" ,"eco-friendly"] }
row number 2 example:
{ "categories" : ["economic"], "tags": ["eco-friendly"] , "keywords" : ["2050"] }
I want to group the result to get the most frequent value for each one of the keys something like this:
| key | most_freq |
|---|---|
| category | economic |
| tags | eco-friendly |
| keyword | 2050 |
the keys are not constant and could be something other than the example I said but I know that they will be frequent.