我有一张这样的桌子.Col2是字符串类型:
| Col1 | Col2 |
|--------------|------------------------------------|
| some_string |{siblings:0, pets:1, have_friends:0}|
| some_string |{siblings:0, pets:0, have_friends:0}|
| some_string |{siblings:1, pets:2, have_friends:3}|
| some_string |{siblings:1, pets:1, have_friends:0}|
我想使用SQL来解析Col2上的Key:Value对,并筛选出值为"0"的对,这样输出就是:
| Col1 | Col2 |
|--------------|------------------------------------|
| some_string |{pets:1} |
| some_string |{} |
| some_string |{siblings:1, pets:2, have_friends:3}|
| some_string |{siblings:1, pets:1} |
谁来帮帮忙?