, - ( 17mio. row ), :
SQL Server 2008, - (Common Table Expression - CTE). , (,!) , (, , !).
WITH PhoneDuplicates AS
(SELECT c.Telephone, COUNT(*) as PhoneCount
FROM dbo.Company AS c
GROUP BY c.Telephone
HAVING COUNT(*) > 1
)
SELECT
(list of fields from company table)
FROM
dbo.Company AS c
INNER JOIN
PhoneDuplicates as PD ON PD.Telephone = c.Telephone