Handle aggregates differently in PHP SQLHelper.