select count(A.ID) from CRMCampaignAudiences A join EmailsSent B on A.Document_ID = B.ID where A.DocumentType = 'OE' and B.SentState = :SendState and A.Parent_ID = :ObjID
Generated by ABRA Software a.s. 27.10.2021 16:34:54