Parameters to perform a related query on an ArcGISFeatureTable. When querying related features, all participating tables must be included in the same ArcGISMap or ArcGISScene, as either feature layers or non-spatial tables. The query that uses these parameters will load these related tables.
RelatedQueryParameters lets you specify:
Details about the relationship to be queried.
A where clause used to filter features from the related table.
How to sort the results.
Whether to return geometry within the results.
The maximum number of features the query should return. For consistent ordering of results when using pagination, provide a value for RelatedQueryParameters.orderByFields. Note that if you provide a maximum features value to support paging of results, you must also set a QueryParameters.resultOffset value. Otherwise, the result may contain local features in place of server features if they satisfy the query. To ensure strict paging of server features, specify both maximum features and RelatedQueryParameters.resultOffset.
The collection of order by objects that indicates how to sort the results. Results can be sorted by one or more fields. Each order by instance includes a field name and whether to sort by that field in ascending or descending order. If a service-based table is being queried it must support advanced queries.
The starting offset of results to fetch. This is useful for paging through results. For consistent ordering of results when using pagination, you should also provide a value for the RelatedQueryParameters.orderByFields. Note that if you provide a result offset to support paging of results, you must also set a RelatedQueryParameters.maxFeatures value. Otherwise, the result offset is ignored.
The where clause to apply to the destination table. The where clause should follow standard SQL syntax similar to that discussed in the document https://pro.arcgis.com/en/pro-app/latest/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#GUID-940733A1-D6D1-4200-B290-24CA2E1056D4.