Step 1) SELECT * FROM ActivityPointerBase //Use QueryExpression for this step
Step 2) INNER JOIN ActivityPartyBase ON ActivityPartyBase.activityId = ActivityPointerBase.activityid //Use LinkEntity for this step
Step 3)WHERE ActivityPartyBase.partyobjecttypecode = 1 //Use FilterExpression and ConditionExpression for this step