Using AGGREGATE result in another AGGREGATE
764
Views
8
Comments
New
Aggregates & Queries

Something useful and necessary is using SELECT result in another SELECT.


Very common on major databases systems, the use of subqueries is a must have feature that Outsystems could take a moment to analyze and implement.


This could help implementing various complex situations and avoid the use of recordlists, structures and local variables.


Imagine: you are creating/editing an Aggregate and you can choose database entities and also another created and "same-scope" Aggregates to use in the joins.

Changed the category to
Aggregates & Queries

I would love this to contain options like EXISTS and IN.

Currently if I want to achieve this I have to write advanced SQL.

Why hasn't this happened yet, was just about to raise this as an idea!

Merged this idea with 'Use aggregates a sub-queries.' (created on 07 May 2021 02:16:37 by Jay Parnau)

So if I have a flow where the first aggregate gives me a list (sub-query), I want the next aggregate to let me add the first aggregate as a source and join them with filters. 



This comment was:
- originally posted on idea 'Use aggregates a sub-queries.' (created on 07 May 2021 by Jay Parnau)
- merged to idea 'Using AGGREGATE result in another AGGREGATE' on 07 May 2021 06:16:44 by Daniël Kuhlmann

Hi Jay,

That sounds like a typical use case to use the SQL widget instead of an aggregate.

Regards,

Daniel



This comment was:
- originally posted on idea 'Use aggregates a sub-queries.' (created on 07 May 2021 by Jay Parnau)
- merged to idea 'Using AGGREGATE result in another AGGREGATE' on 07 May 2021 06:16:44 by Daniël Kuhlmann

Excelent idea.

I also had this idea, but not to repeat it, I write it here in the comments.

I think that it would have great advantages in the speed of development (more visual), and mainly it would make the handling of data easier for SQL beginners, and therefore it would be less of a big barrier to the adoption of the Outsystems platform.

To my amazement, this idea has very few likes.

I propose to change the title to 'Aggregates within aggregates', and the text to include a list of advantages and another list of disadvantages. Anyone could add items to these lists.