One Star

[resolved] taggregaterow vs taggregatesortedrow vs tuniqrow

Hi,
I'm pulling out unique combinations of fields from a file.
What I'm doing atm is using taggregaterow and grouping on the fields I want to have unique and using no expressions. Seems to work ok.
But I wonder what the difference between aggregatesortedrow and aggregaterow is. And uniqrow needs to work on sorted input as well if I read the docs correctly so what's the deal there?
Br
/fr
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] taggregaterow vs taggregatesortedrow vs tuniqrow

Hi
Here is test data.
id;name;
2;a
2;c
1;b

If you use taggregaterow with setting "group by" id and "first" each row, the output will like this.
2;a
1;b

If you use taggregatesortedrow with the same settings, the output will as follow.
1;b
2;a

If you use tuniqrow, you can not only get the unique row but also the duplicate row.
Regards,
Pedro
3 REPLIES
One Star

Re: [resolved] taggregaterow vs taggregatesortedrow vs tuniqrow

Hi
Here is test data.
id;name;
2;a
2;c
1;b

If you use taggregaterow with setting "group by" id and "first" each row, the output will like this.
2;a
1;b

If you use taggregatesortedrow with the same settings, the output will as follow.
1;b
2;a

If you use tuniqrow, you can not only get the unique row but also the duplicate row.
Regards,
Pedro
One Star

Re: [resolved] taggregaterow vs taggregatesortedrow vs tuniqrow

Thanks for the info!
BR
/fr
One Star

Re: [resolved] taggregaterow vs taggregatesortedrow vs tuniqrow

Will tAggregateSortedRow Sort first and then Aggregate it or first Aggregate then sort it?