SyntaxFix
Write A Post
Hire A Developer
Questions
You can do this without a JOIN:
JOIN
SELECT * FROM (SELECT *,COUNT(*) OVER(PARTITION BY phone_number) as Phone_CT FROM YourTable )sub WHERE Phone_CT > 1 ORDER BY phone_number, employee_ids
Demo: SQL Fiddle