SUBSTRING_INDEX¶
SUBSTRING_INDEX(str, delimiter_str, n)
Returns a substring of the input string, which contains
all characters that occur before n occurrences of the
delimiter string. if n is negative, it will return all
characters that occur after the last n occurrences of the
delimiter string. If num_occurrences
is 0, it will return
the empty string
For example: