There are several approaches to count the occurrences of a substring inside a larger string in MySQL. Some people use
length() (I would use
char_length() instead) to do it. Others use stored functions. Recently I had to count the occurrences of a certain key across many rows of JSON. Instead of writing my own query using one of the approaches mentioned above I decided to use common_schema.
In the past I've discussed JSON parsing in MySQL using common_schema.[Read more...]