I am collecting JSON data in MYSQL column. I want to count numbers with same keywords in this JSON data.
Example JSON column:
| id | column |
|---|---|
| 1 | { "2": { "model": "Test Model" }, "3": { "model": "Test Model" } } |
| 2 | { "4": { "model": "Test Model" }, "2": { "model": "Test Model" } } |
| 3 | { "1": { "model": "Test Model" }, "4": { "model": "Test Model" } } |
| 4 | { "2": { "model": "Test Model" } } |
The output I want:
| key | count |
|---|---|
| 2 | 3 |
| 4 | 2 |
| 3 | 1 |
| 1 | 1 |
Can I do this easily and with shortcodes?
Mysql version: 8.0.27