SELECT a, b FROM foo GROUP BY a;

SELECT a, b FROM foo GROUP BY a,b;

SELECT a, b FROM foo GROUP BY a ASC;

SELECT a, b FROM foo GROUP BY a DESC;

SELECT a, b FROM foo GROUP BY a WITH ROLLUP;

SELECT a, b FROM foo GROUP BY a ASC WITH ROLLUP;

SELECT a, b FROM foo GROUP BY a DESC WITH ROLLUP;

SELECT a, b FROM foo GROUP BY a ASC, b DESC WITH ROLLUP;

SELECT a, b FROM foo GROUP BY a WITH ROLLUP ORDER BY a;

SELECT a, b FROM foo GROUP BY a ASC WITH ROLLUP HAVING a > 0;
