Skip to content
Advertisement

How to solve “SQL aggregate function not allowed”?

I want to get the cases per million where a table contains “Province Population” and another table “Interim” contains a column that has unique Epid_ID values. I want to divide the count of these “Epid_ID” values with the population where the data type of population is big numeric and I am using Big Query. Following is the sql query I have written.

The error I am getting is “Column case_per_million contains an aggregation function, which is not allowed in GROUP BY at [7:35]”

Following is my sample data for Interim:

Following is my sample data for Province Population Table

Advertisement

Answer

Try below instead

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement