There is one table where data stored in JSON format. I need to find how many records are there where Quote Required.
JSON
[{"id":14,"desc":"Job is incomplete.","quote_required":"Yes"},
{"id":14,"desc":"appointment need to rebook","quote_required":"Yes","start-date":"2021-11-20"}]
I am trying to achieve about using below JSON_CONTAINS()
and JSON_EXTRACT()
SELECT COUNT(*)
FROM `products`
WHERE JSON_CONTAINS( JSON_EXTRACT(submit_report, "$.quote_required"), '"Yes"' )
But I am getting 0 results here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…