handle using 'AS' in grouping expressions.