SQL Help - Exclude data with just one distinct value I have the following query:

select agentname,CallCenterID, count(leadid) Dials
from LeadCallHistory
where agentname not in ('vdad','system')  
    and cast(callCenterStartTime as date) between cast(getdate()-1 as date) 
        and cast(getdate()-1 as date)
group by agentname, CallCenterID


What is the best way to exclude rows of data where a CallCenterID field only has 1 unique Agentname?  For example if the query were to return:

agentname    CallCenterID   Dials
jjones       999            100
jjones       1000           500
crobin       1000           1000
jjones       1001           500
crobin       1001           500
swhite       1002           1000

In this example I would like to exclude the data for CallCenterID's 999 and 1002 because they only has 1 unique agentname
One way to do this:

with stats as (
  select agentname,CallCenterID, count(leadid) Dials
  from LeadCallHistory
  where agentname not in ('vdad','system')  
    and cast(callCenterStartTime as date) between cast(getdate()-1 as date) 
    and cast(getdate()-1 as date)
  group by agentname, CallCenterID
) 
select * from stats s1 where exists (
  select 1 from stats s2 
  where s2.CallCenterID = s1.CallCenterID
    and s2.agentname &lt;&gt; s1.agentname
)