Have a look at example:
DECLARE @tbl TABLE (ID INT IDENTITY(1,1), SomeData VARCHAR(30))
INSERT INTO @tbl (SomeData)
VALUES('a'),('b'),('c'),
('a'),('d'),('e'),
('d'),('b'),('f'),
('h'),('g'),('c')
SELECT ID, SomeData
FROM @tbl
SELECT SomeData, COUNT(SomeData) AS CountOfSomeData
FROM @tbl
GROUP BY SomeData
HAVING COUNT(SomeData)>=1
For further information, please see:
Eliminating Duplicates with DISTINCT[
^]
Find and/or Delete Duplicate Rows[
^]
Find Duplicates using LINQ[
^]
Note: you should provide more details about your issue, at least sample data and expected output.