Reputation: 53
I have a table listed like this and i want to find out what are the display names that has repeated on the table, there are so many data that I cannot go manually, and tag names are different even though display names are same.
> tag name display name
> 3_call call
> 180_call call
> 3_pass pass
> 3_depp deep
The table has so much data and I want to find out what are the display names has occurred more than one time.
:)
Upvotes: 0
Views: 188
Reputation: 13484
Try this
select displayname,count(*)
from tablename
group by displayname
having count(*) > 1
Upvotes: 2
Reputation: 1104
To find out how many times each [display name] appears:
SELECT [display name], COUNT(*)
FROM <Table>
GROUP BY [display name]
To find [display names] that appear more than once:
SELECT [display name], COUNT(*)
FROM <Table>
GROUP BY [display name]
HAVING COUNT(*) > 1
Upvotes: 2