Eng 6553 group by alias

Waiting for Jenkins...
It is strange for a function named printExplainPlan to have a flag that means "really print" or "don't really print".

Make two methods: buildExplainPlan that returns a string and printExplainPlan that calls buildExplainPlan, prints the result, and returns void.