The {2} expression for the {0} {1}' specifies a scope that is not valid for a nested aggregate. The scope must be the same ...

The {2} expression for the {0} ‘{1}' specifies a scope that is not valid for a nested aggregate.  The scope must be the same name of the scope specified by the outer aggregate or the name of a group or data region that is contained in the scope specified by the outer aggregate.