How can you modify an Aggregate to return the number of orders per priority?

Enhance your skills with the OutSystems Reactive Web Developer Test. Use flashcards and multiple choice questions, each with helpful hints. Ace your exam!

The option that involves creating a Group By over the Priority.Id and a Count over the Order.Id is the correct choice because it effectively organizes the data by the priority of the orders. When grouping by Priority.Id, the aggregate function will group all orders that share the same priority. Then, applying a count over Order.Id will yield the total number of orders for each distinct priority value.

This approach directly answers the need to see how many orders exist for each priority level, delivering an accurate and clear summary of the data based on priority classifications. Grouping by Priority.Id establishes the categories, while counting Order.Id gives the quantities associated with each category, leading to the desired result of knowing how many orders are associated with each priority level.

Other approaches, such as simply counting over Priority.Id or modifying the join settings, do not establish the necessary relationship between orders and their respective priorities, which is why they would not correctly fulfill the requirement of counting the orders per priority.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy