-3021: Invalid mixture of functions and columns
Explanation:
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.