Hi,

I need to group by only id in an aggregate but i am not able to  display other attributes  in the table is there any solution for this. I can use sql but performance is slow by using an sql i need to acheive group by  in aggregate.


Thanks,

Ronan T. 

Hi Ronan, 

There is no differences, regarding Group By in aggregates or SQL Tool. 

When you perform group by ID, this is the only attribute available, both in aggregate or sql. 

If you need to show more attributes, they need to be part of the group, or they will not be available. 

But you can have computed attributes and aggregated columns (count, avg, etc) just like in SQL. 

Cheers 

Eduardo Jauch wrote:

Hi Ronan, 

There is no differences, regarding Group By in aggregates or SQL Tool. 

When you perform group by ID, this is the only attribute available, both in aggregate or sql. 

If you need to show more attributes, they need to be part of the group, or they will not be available. 

But you can have computed attributes and aggregated columns (count, avg, etc) just like in SQL. 

Cheers 

Hi Eduardo Jauch,

If  I  group by all the attributes in the aggregate then the count of records will change .Is there any other way we can acheive it

Thanks,

Ronan T.


Hello Ronan

Yes, the count will change because you are creating different groups. 

Exactly like in SQL. 

In SQL you also can't show in the Select clause attributes that are not grouped by when you use a Group By clause. 

Só, your question does not make sense. 

Cheers

Additionally, since the Id of an Entity will be unique, grouping on them makes no sense (unless you mean another Id that's a foreign key). But like Eduardo said, it seems you don't fully understand what a GROUP BY actually does. See also my answer here.