Aggregates on data of filtering dimension | Community
Skip to main content
Marcel_Szimonisz
Community Advisor
Community Advisor
June 27, 2019
Solved

Aggregates on data of filtering dimension

  • June 27, 2019
  • 12 replies
  • 10600 views

Hello All,

Before there was a checkbox where you could exclude id from the main set when doing aggregate functions. Now that is gone you always get error saying

enrich WDB-200001 SQL statement 'INSERT INTO wkf631156212_14_1 (sBrowserName,iMax__id_,iCount__id_,iId) SELECT   U2.sBrowserName, max(W0.iId), Count(W0.iId), W0.iId FROM wkf631156212_13_1 W0 JOIN NmsTrackingLogRcp T1 ON (T1.iTrackingLogId = W0.iId) JOIN NmsUserAgent U2 ON (U2.iHashKey = T1.iUserAgent) WHERE ((T1.iTrackingLogId > 0 OR T1.iTrackingLogId < 0)) GROUP BY U2.sBrowserName' could not be executed.

enrich PGS-220000 PostgreSQL error: ERROR:  column "w0.iid" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: ...422,iId) SELECT   U2.sBrowserName, count(W0.iId), W0.iId FRO...

                                                     

It always add the primary key to the aggregate function how i am supposed to do the queries now. Do you guys have workaround other than select all and then do the aggregates linked to the dimension?

thanks

marcel

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 asariaaara

Hi marcel.gent.86​,
That excluding PK option is not found in enrichment from as long i am using ACM.
However you can use query to group/aggregate the data, excluding automatic adding of PK can be found there.

Regards.

12 replies

Amit_Kumar
Level 10
July 3, 2019

Query, either at standard or using inbound event data.

Level 3
July 4, 2019

Hi Amit,


Sorry I didnt catch you.
Are you saying that I should use query activity.

I was asking what should i select here:

Since this table is not linked to any other table.

Regards.