mysql 匹配json 数组字段中值出现的次数
精确匹配
SELECT COUNT(id) FROM Fund f WHERE JSON_EXTRACT(f.manager,’$[0]’) = ‘段鹏’
select count(1) from Fund where JSON_CONTAINS(manager->’
[
∗
]
′
,
′
"
段
鹏
"
′
,
′
[*]', '"段鹏"', '
[∗]′,′"段鹏"′,′’)
模糊匹配
SELECT count(1) FROM Fund WHERE JSON_EXTRACT(manager,’$[*]’) LIKE “%段鹏%”;
[1]: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference
[2]: https://mermaidjs.github.io/
[3]: https://mermaidjs.github.io/
[4]: http://adrai.github.io/flowchart.js/