Column '%1!s!.%2!s!' is invalid in the HAVING clause because it is not contained in an aggregate function and there is no ...