#  SUBSTRING_INDEX
__*SUBSTRING_INDEX function*__
+ **`SUBSTRING_INDEX(str, delim, count)`**: Returns the substring of the string before the delimiter occurrence **`count`**
  + If the **`count`** is negative, the direction is reversed
+ For example:
  + **`SELECT SUBSTRING_INDEX('853:888:777:598',':',1), SUBSTRING_INDEX('853:888:777:598',':',2), SUBSTRING_INDEX('853:888:777:598',':',-2)\G`**  
```
tidb> SELECT SUBSTRING_INDEX('853:888:777:598',':',1), 
   -> SUBSTRING_INDEX('853:888:777:598',':',2), 
   -> SUBSTRING_INDEX('853:888:777:598',':',-2)\G
*************************** 1. row***************************
 SUBSTRING_INDEX('853:888:777:598',':',~!@1@!~): 853
 SUBSTRING_INDEX('853:888:777:598',':',~!@2@!~): 853:888
SUBSTRING_INDEX('853:888:777:598',':',~!@-2@!~): 777:598
1 row in set (0.00 sec)
```

------------------------------------------------------------
- SUBSTRING_INDEX () return the substring from a string before the delimiter for the specified number of occurrences
