Aggregate to return values of selected columns

Aggregate to return values of selected columns

  

Is it possible to make an aggregate to return the values of selected columns alone?

Like we are able to query selected columns from an entity using SQL, can we do the same thing using aggregate?

Solution

Hi Ananth,

There's absolutely no need to do that. The Platform Optimizer will recognize which columns you use, and only use these in the underlying SELECT.

Solution

Hi Ananth,

In aggregates you don't need to worry about that because outsystems takes care of that for you and only queries the fields of the aggregate that you use/need.

Regards,

Marcelo

@Marcelo: I got there first! ;)

@Kilian Im on smartphone so I write a lot slower ;)

If I want to force the aggregate to return only one column I use group by, but on this case might not be need

Nelson,

The only reason to limit the output would be if you want to pass it as Output Parameter, and you don't want to bother with creating a new Structure. However, using Group By comes with a performance penalty, so use it with care!