mysql> select (SUBSTRING_INDEX(SUBSTR(UserEmailAddress, INSTR(UserEmailAddress, '@') + 1),'.',1)) as DomainName from selectDomainNameOnly;