I have a mysql table with a field name
which might have common entries like below
name
---
abc
abc.com
I want to select all common values and i have written the query below:
select * from table
group by name having count(*) >= 2;
Here, name is basically server hostname. So, as per definition, I need to compare only the first value before .
So, server
is same as server.abc.com
I am getting 0 rows selected which doesn't look correct