Entering content frame

-3021: Invalid mixture of functions and columns 

Explanation:

...

¡  When quantity functions (COUNT, MAX/ MIN, SUM, AVG, VARIANCE, STDDEV) occur in a SELECT <select_column> statement, non-group columns are not allowed in the (select_column).

Quantity functions, e.g. AVG(SUM...), must not be nested.

A corresponding subquery S contained in the WHERE clause  of the QUERY specification Q must not contain quantity functions for columns of tables specified in the FROM clause  of the QUERY specification Q.

User Action:

Correct the SQL statement.

Try to achieve the desired effect without nesting the quantity functions by using several QUERY statements each containing a quantity function.

Inside a QUERY statement the effect can be achieved by specifying a QUERY expression in the FROM clause.

 

Leaving content frame