Aggregation extensions - Amazon Redshift
Amazon Redshift supports aggregation extensions to do the work of multiple GROUP BY operations in a single statement.