# E051-02: GROUP BY clause

statement ok
CREATE TABLE TABLE_E051_02_01_01 ( ID INT PRIMARY KEY, A INT, B INT );

query II
SELECT A, B FROM TABLE_E051_02_01_01 GROUP BY A, B

statement ok
CREATE TABLE TABLE_E051_02_01_02 ( ID INT PRIMARY KEY, A INT, B INT );

query II
SELECT A, B FROM TABLE_E051_02_01_02 WHERE A = 1 GROUP BY A, B

statement ok
CREATE TABLE TABLE_E051_02_01_03 ( ID INT PRIMARY KEY, A INT, B INT );

query II
SELECT ALL A, B FROM TABLE_E051_02_01_03 GROUP BY A, B

statement ok
CREATE TABLE TABLE_E051_02_01_04 ( ID INT PRIMARY KEY, A INT, B INT );

query II
SELECT ALL A, B FROM TABLE_E051_02_01_04 WHERE A = 1 GROUP BY A, B

statement ok
CREATE TABLE TABLE_E051_02_01_05 ( ID INT PRIMARY KEY, A INT, B INT );

query II
SELECT DISTINCT A, B FROM TABLE_E051_02_01_05 GROUP BY A, B

# FIXME: Eliminate duplicate aggregations

statement ok
CREATE TABLE TABLE_E051_02_01_06 ( ID INT PRIMARY KEY, A INT, B INT );

query II
SELECT DISTINCT A, B FROM TABLE_E051_02_01_06 WHERE A = 1 GROUP BY A, B

statement ok
CREATE TABLE TABLE_E051_02_02_01 ( ID INT PRIMARY KEY, A INT, B INT );

query I
SELECT A FROM TABLE_E051_02_02_01 GROUP BY A

statement ok
CREATE TABLE TABLE_E051_02_02_02 ( ID INT PRIMARY KEY, A INT, B INT );

query I
SELECT A FROM TABLE_E051_02_02_02 WHERE A = 1 GROUP BY A

statement ok
CREATE TABLE TABLE_E051_02_02_03 ( ID INT PRIMARY KEY, A INT, B INT );

query I
SELECT ALL A FROM TABLE_E051_02_02_03 GROUP BY A

statement ok
CREATE TABLE TABLE_E051_02_02_04 ( ID INT PRIMARY KEY, A INT, B INT );

query I
SELECT ALL A FROM TABLE_E051_02_02_04 WHERE A = 1 GROUP BY A

statement ok
CREATE TABLE TABLE_E051_02_02_05 ( ID INT PRIMARY KEY, A INT, B INT );

query I
SELECT DISTINCT A FROM TABLE_E051_02_02_05 GROUP BY A

statement ok
CREATE TABLE TABLE_E051_02_02_06 ( ID INT PRIMARY KEY, A INT, B INT );

query I
SELECT DISTINCT A FROM TABLE_E051_02_02_06 WHERE A = 1 GROUP BY A
