Skip to content
Advertisement

SQL Anywhere error – Function or column reference to ‘Fraction’ must also appear in a GROUP BY

I have this simple SQL SELECT that summarizes by ProductID but I get this “must appear” error.

SQL requires me to put column Fraction into GROUP BY clause which I do not need. I just need to summarize by ProductID. How do I build correct SQL statement here?

Thanks.

Advertisement

Answer

You need to use aggregate function:

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