select c.personalAccount from rtneo$Contragent c where not c.type = 3
and (select count(r) from rtneo$RealEstateContainerYard r where r.contragentRealEstate.contragent.id = c.id and r.factRequest = 20)=0
and (select count(ct) from rtneo$Contract ct where ct.contragent.id = c.id and ct.accepted = true)>5