I found a few other threads with this error message on the site but the solutions there did not seem to work for me.
This is the query I am trying to run:
SELECT o.name as Name, o.vrank_tav__c as Vrank, COUNT(c.enterprise_id) AS #_users_enterprise FROM (community_csv_james c JOIN salesforce_data_opportunity o ON c.enterprise_id = o.enterprise_id__c) GROUP BY #_users_enterprise, Name, Vrank ORDER BY #_users_enterprise DESC;
When I run it on SQL Workbench J, I get the following error:
SELECT o.name as Name, o.vrank_tav__c as Vrank, COUNT(c.enterprise_id) AS #_users_enterprise FROM (community_csv_james c JOIN salesforce_data... ERROR: aggregates not allowed in GROUP BY clause
I've tried a few variations of this but I that promoted different error messages. How should I write this query?
Thanks!