I have email addresses like user1@gmail.com, user2@ymail.com user3@hotmail.com ... etc. I want a Mysql SELECT that will trim user name
user1@gmail.com
user2@ymail.com user3@hotmail.com
SELECT
If you want to know the most used domain names from email addresses you have (can be usefull), you can do :
select (SUBSTRING_INDEX(SUBSTR(email, INSTR(email, '@') + 1),'.',1)) as a,count(*) as c FROM User group by a order by c desc;
Result :