The error Aggregation expression required by GROUP BY clause means exactly that. If you use a GROUP BY then there must be an aggregation expression in the load. You need to add an aggregation expression so that something can be grouped. For example:
load DOC , Sum(PART) as SumOfParts
GROUP BY "DOC"
looking at the second LOAD statement, you have a GROUP BY clause, but are not specifying what aggregation you are trying to perform.
minstring(PART) as PART
GROUP BY DOC;
This would work, but isn't necessarily what you are trying to achieve.
What aggregation are you trying to perform here?