You can Set filter on fetchxml by using this code.
<filter type="and">
<condition attribute="FirstHorizontalGroup" operator="eq" value="@ownerID" />
</filter>
- The best practice is to Make Query through AdvanceFind in CRM,Advance Find Option will give you complete FetchXml file having filter and any other option. After that you just need to set the parameter in Filter Value.