This question is the continue of Select distinct substrings that are in a comma separated string | MySql. Based on the answer of these post I built this function:
<