Suppose you want to view the 20 most expensive equipment items according to total cost, where the value in the Breakdown Indicator field is set to True. In this case, you would create the query on the Equipment and Work History fields, joined via the Has Work History relationship, and add the Equipment ID, Equipment Short Description, and Total Cost fields to the query.
The Total Cost field is included, and the query is configured to show the sum of all total cost values, grouped by Equipment ID. In this case, rather than showing two separate rows in the results for each Work History record that is linked to this Equipment record, the results will contain one row for this Equipment record, and the Total Cost column will display the sum of the individual values in the Total Cost field in each Work History record. Additionally, the query is configured to show the results in descending order according to total cost.
Based on this query configuration, if you were to run the query at this point, you would see all Equipment records that meet the query criteria.
In this scenario, however, you want to view only the 20 most expensive pieces of equipment. To refine this query to suit your needs, in the Conditions section heading, set the limit to 20. When you run the query again, only those 20 Equipment records will be returned by the query.