How about this:
WITH cte0 AS
(
SELECT COMPANY , CATEGORY , Session FROM Dupes GROUP BY COMPANY , CATEGORY , Session
)
, cte1 AS
(
SELECT COMPANY FROM cte0 GROUP BY COMPANY HAVING COUNT(*) > 1
)
SELECT A.*
FROM cte0 A
INNER JOIN cte1 B
ON A.COMPANY=B.COMPANY
The problem is that you are having trouble describing what you mean by "there are Many Duplicate Entries". You are not actually looking for duplicates in the source table, you are looking for duplicate company values once you have a list of unique records from the source. That is, duplicates in the result of your statement
Select Distinct COMPANY,CATEGORY,Session from Table
COMPANY CATEGORY Session
Stan Co 2 1
Wills Corp 5 1
Wills Corp 7 1
Wills Corp 7 2
I used a Common Table Expression (cte0) to hold that result.
http://technet.microsoft.com/en-us/library/ms190766(v=SQL.105).aspx[
^]
(You could use a temporary table if you like.)
The output you specified is any row from that result for which a company name appears more than once.
In cte1 I selected the duplicated Company name(s).
And finally I JOINed the two results to get only those rows from cte0 that have a name that appears more than once.