


Hello, I have a problem using aggregate function in ACS.
When I add an additionnal data wich is based on the SUM() function in a simple query activity, I get a PostgreSQL Error : column "n1.irecipientid" must appear in the GROUP BY clause or be used in an aggregate function.
I can't do any aggregate, could you help me please.
Thanks
asish_kumarp599
asish_kumarp599
16-12-2018
Thanks for sharing the screenshots! Here are my comments:
anasso83525035
anasso83525035
16-12-2018
Salut Pierre-Yves,
Pour un besoin similaire, j'ai configuré la même Query que toi. ça semble logique, mais j'ai pris le temps de comprendre pourquoi ça ne fonctionne pas, avant de trouver une solution de contournement que je partage volontiers en anglais :
The aggregate functions don't work with simple fields, only with collections :
The average profile age can be calculated by creating a Profile collection using Additional data in the main query and the Enrichment activity :
Confirm all and run workflow. The field Avg(Age) should be added to Profile Collection.
jyotiy2857946
jyotiy2857946
21-05-2020
Hi,
You can perform aggregate in Query, as shown below:
Add Group by line and you will be able to execute query without error.
Thanks.
pierre-yvesm520
pierre-yvesm520
17-12-2018
OK Thanks to both of you for your answers.
asish kumarp59945245 : I'll find a way to perform the calculation I need without using the agregate functions on the advanced expression editor then.
anasso21228396 : I could effectively use the collections to perform agregate calculations (but i'll have to adapt my workflow before)
pierre-yvesm520
pierre-yvesm520
16-12-2018
pierre-yvesm520
pierre-yvesm520
16-12-2018
asish_kumarp599
asish_kumarp599
15-12-2018
Can you please share the Screenshot of your Properties & General tab. It may occur if your targeting dimension is not Profile.
pierre-yvesm520
pierre-yvesm520
12-12-2018
Hello,
The query in on profiles for example, see below.
- Profile : Has children = Yes
And in additionnal Data :
- Average(age)
This cause an error in the query :
I hope my post is detailed enough.
Thanks in advance
asktam1410
asktam1410
11-12-2018
Post the query which you are trying
pierre-yvesm520
pierre-yvesm520
11-12-2018
Hello,
I dont have such options, I working on Adobe Campaign Standard (ACS) and the only option avaliable is to remove duplicate rows :
(The screenshot is from a french version)
asktam1410
asktam1410
11-12-2018
did you select group by enabled in the output cololums as well as enable the following options under advanced parameters.