ACC Tips & Tricks, Adobe Campaign, Marketing Automation

Column must appear in GROUP BY clause

Adobe Campaign Classic tips

Creating aggregated data reports may not be a daily task, but there are times when you might be tasked with generating such reports. For instance, you could group and track log clicks to create the coveted ‘Hot Clicks Report’.

You tell yourself, ‘It’s nothing major,’ and believe you have an idea of how to do it. However, when you set everything up in the enrichment or query activity, you encounter the following error:

25/07/2023 19:31:15 query2 PGS-220000 PostgreSQL error: ERROR: 
column "t0.itrackinglogid" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: 
…nternalName, D2.sLabel, Count(T1.iTrackingUrlId), T0.iTracki…

Long story short Adobe Campaign Classic somehow always adds to the select clause primary key of the targeting dimension, thus never added to group clause and this message will start to haunt us. To remove this error you will need to check following option in Advanced parameters of Add data…

In short, Adobe Campaign Classic somehow always adds the primary key of the targeting dimension to the select clause. To resolve this error, you will need to check the following option in the Advanced Parameters of ‘Add Data…’

Good to remember:

Eventhough Add data... feature exists in Query, Enrichment, Change dimension but the ‘Disable automatic adding of the primary keys of targeting dimension’ only is found in the Query activity

You can only access the Advanced parameters from Edit additional data... So you will spend ages looking for it when adding data

Oh hi there 👋
I have a FREE e-book for you.

Sign up now to get an in-depth analysis of Adobe and Salesforce Marketing Clouds!

We don’t spam! Read our privacy policy for more info.

#SQL #workflow
Marcel Szimonisz
Marcel Szimonisz
MarTech consultant As a marketing automation consultant, I specialize in solving problems, automating processes, and driving innovation in my clients' marketing platforms.

I hold certifications in Adobe Campaign v6 (3x certified) and Salesforce Marketing Cloud (5x certified).

Additionally, I serve as a community advisor for Adobe Campaign, offering expert insights and guidance.

In addition to my professional pursuits, I also enjoy exploring various programming languages, CMSs, and frameworks, further enhancing my technical expertise and staying at the forefront of industry advancements.
Take a look at our subscription offering in case you are looking for a Marketing Automation Consultant.

Leave a comment

Your email address will not be published. Required fields are marked *

Similar posts that you may find useful

Adobe Campaign Classic Automate Publishing File Resources With Workflow
Adobe Campaign, Marketing Automation

Automate publishing file resources with workflow

2 minutes read

Sometimes, you will reach a point where you want to upload file resources from a script. Although there are hints on the Experience League, even with those, this problem has caused me some troubles. However, challenges and troubles are what I seek. I have decided to map this functionality, which can become handy once in […]

Continue reading
How to JavaScript in SFMC
Marketing Automation, Salesforce Marketing Cloud

Master JavaScript in Salesforce Marketing Cloud

3 minutes read

Salesforce Marketing Cloud uses JavaScript where a advanced customization is needed e.g. automations, cloud pages and even in message personalization. Last time we discussed how to JavaScript in Adobe Campaign, we discovered that it utilizes an older version of ECMAScript. However, it’s worth noting that Salesforce Marketing Cloud (SFMC) goes even further back and employs […]

Continue reading
Adobe Campaign Classic tips
ACC Tips & Tricks, Adobe Campaign, Marketing Automation

Troubleshooting web applications

1 minute read

When building any web application (webapp), you may have experienced a syntax error on, for example, line 200. This can be perplexing, especially when your custom JavaScript code does not even have 200 lines. Why is that? The reason for this discrepancy is that the web applications you create in the visual editor are compiled […]

Continue reading
Link campaign to the delivery send in salesforce marketing cloud
Salesforce Marketing Cloud

SFMC | Link campaign to delivery send

3 minutes read

Are you aware of Salesforce Marketing Cloud’s additional marketing feature known as Campaign? This tool allows you to group similar journeys together, providing greater organization for your marketing activities. However, one drawback is that the campaign information is not available in the data views. While waiting for a fix from Salesforce, you can establish a […]

Continue reading
Adobe Campaign Classic tips
ACC Tips & Tricks, Adobe Campaign, Marketing Automation

Mastering Email Template Proofing for Multiple Variants

1 minute read

Imagine having to proof all the possible variants of a delivery template, where there could be numerous end variations. How can we effectively proof such an email template? There is a simple yet powerful workaround for proofing all the variants, and here’s how to achieve it: Moreover, to differentiate between variations, you can include your […]

Continue reading