ASSOCIATE-REACTIVE-DEVELOPER practice question 14 of 35

When using aggregation functions, the output of the Aggregate will not include the columns at grey.

Full set: 262 questions
Answer options
A: True
B: False
Correct Answer:
T; R; U; E
Explanation

In an OutSystems Aggregate, when you apply an aggregation function (such as Count, Sum, Average, etc.) to one or more attributes, the Aggregate automatically enables grouping. Any attribute that is not part of the grouping criteria and does not have an aggregation function applied to it is visually "greyed out" in the editor. This indicates that the attribute is excluded from the SQL query's SELECT list and will not be part of the Aggregate's output structure. The result set will only contain the attributes used for grouping and the attributes with aggregation functions.

Why Incorrect

The statement "False" is incorrect. If it were false, it would imply that the greyed-out columns are included in the Aggregate's output. This contradicts the fundamental behavior of a GROUP BY query in SQL, which the OutSystems Aggregate visually represents. Including a non-aggregated, non-grouped column in the SELECT list of a grouped query is a logical and syntactical error, and the OutSystems platform prevents this by excluding these columns from the result.

References

1. OutSystems Official Documentation, "Group data in an Aggregate": This document explicitly describes the behavior. It states, "When you use an aggregate function on an attribute, for example, Count, the other attributes of the Aggregate are automatically used to group the results... The attributes that are not used for grouping or for an aggregate function are not available in the output of the Aggregate." The accompanying images show the non-grouped, non-aggregated columns greyed out.

Source Location: OutSystems Documentation > Documentation > Developing an App > Build Apps > Logic > Fetch and Display Data > Group data in an Aggregate.

2. OutSystems Official Documentation, "Aggregates": This section provides an overview of the visual query builder. It explains that Aggregates are optimized and translate to efficient SQL. The behavior of excluding non-grouped columns is part of this optimization and adherence to standard SQL rules.

Source Location: OutSystems Documentation > Documentation > Developing an App > Build Apps > Logic > Fetch and Display Data > Aggregates.

Scroll to Top