Can't have aggregate function in expression <expression>. (Error 3095)

You cannot use an aggregate function in this expression.