Switch final global aggregation to max.

Query 3 does a MAX computation anyway, so we might as well pipeline it.