Skip to content
Advertisement

How to fix aggregate functions are not allowed in GROUP BY?

I have the following data:

Then i do the following query:

The result is correct:

Then i add two column, name and value:

That return:

What i expect is:

If i add group by on guid_count, cuid_count, and umdid_count:

How to overcome this problem? Could you help point me where my mistake is?

Thank you.

Advertisement

Answer

You should use an aggregate for the added column, e.g.:

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