select d.AboneNo, d.tDocumentId, COUNT(d.tDocumentId) as 'Adet'
from tBatch as b
inner join tDocument as d on d.tBatchId = b.tBatchId
where ISNULL(b.Deleted,0)=0 and ISNULL(d.Deleted,0)=0
group by d.AboneNo, d.tDocumentId having COUNT(d.tDocumentId)>1...