If you define relationships, we recommend using a WHERE clause:
Here is an example of this query method from the Work Order Module. This query will result in all of the work orders where there are work order locations with no building number defined and no X or Y Coordinate defined and a status of Complete:
Note: When defining a relationship, you should not modify the table(s) specified in the query. Instead, you should add a WHERE clause to define which records you would like returned in the filter.