SQL ‘Cannot perform an aggregate function on an expression containing an aggregate or a subquery.’ Looking for a bit of help.