select A.* From CAIPIAO A inner join
(select RNumber1,RNumber2,RNumber3,RNumber4,RNumber5,RNumber6,BNumber From CAIPIAO
group by RBNumber1,RNumber2,RNumber3,RNumber4,RNumber5,RNumber6,BNumber
having COUNT(ID)>1) B on A.RNumber1=B.RNumber1 and A.RNumber2=B.RNumber2
and A.RNumber3=B.RNumber3
and A.RNumber4=B.RNumber4
and A.RNumber5=B.RNumber5
and A.RNumber6=B.RNumber6
and A.BNumber=B.BNumber