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

See Also

You cannot use an aggregate function in this expression.