I have written the select fallowing query but it is giving different results surprisingly any wrong in the query. pls let me know. Query:
Select count(*) Count from conflux.dbo.SABR_Master M
Where M.Email in (
select top 26 Email from conflux.dbo.SABR_Master L
where (L.titleid In (Select titleid From sabr_titlemasters Where IsDisplay=1 And title like '%Account Executive%' OR title like '%Account Manager%' OR title like '%Accounts Manager%' OR title like '%admin%' ))
) and M.Email NOT IN (select Email from [sample client].dbo.Comm_CompanyData)
Try this
I have added brackets around your title like OR’s and an Order By to keep your 26 emails the same. The database can return them in a random order if order by is not specified, which can give you different results.