Problem with aggregate function in ACS | Community
Skip to main content
pierre-yvesm520
Level 2
December 6, 2018
Solved

Problem with aggregate function in ACS

  • December 6, 2018
  • 11 replies
  • 9174 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by asish_kumarp599

Thanks for sharing the screenshots! Here are my comments:

  • I think you are using the avg function available in the 'Expression Editor'?  Unfortunately, these Aggregate functions available in query editor are not quite efficient in the 'Additional data' section of query editor . Also, to fulfill your requirement there is no Group By function with Aggregate function here.
  • However, these Aggregate functions works quite well in 'Extract file' activity. You can use the Avg function in the output column section and the use Transfer file activity to export the data. I am not sure this works for you but I see this is only way to get the avg function work.

11 replies

jyotiy2857946
May 21, 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.