SQL

MySQL SUBSTRING_INDEX() Function

Return a substring of a string before a specified number of delimiter occurs: