# F041-04: RIGHT OUTER JOIN

statement ok
CREATE TABLE TABLE_F041_04_01_011 ( ID INT PRIMARY KEY, A INTEGER );

statement ok
CREATE TABLE TABLE_F041_04_01_012 ( ID INT PRIMARY KEY, A INTEGER );

query II
SELECT TABLE_F041_04_01_011.A, TABLE_F041_04_01_012.A FROM TABLE_F041_04_01_011 RIGHT JOIN TABLE_F041_04_01_012 ON TABLE_F041_04_01_011.A = TABLE_F041_04_01_012.A

statement ok
CREATE TABLE TABLE_F041_04_01_021 ( ID INT PRIMARY KEY, A INTEGER );

statement ok
CREATE TABLE TABLE_F041_04_01_022 ( ID INT PRIMARY KEY, A INTEGER );

query II
SELECT TABLE_F041_04_01_021.A, TABLE_F041_04_01_022.A FROM TABLE_F041_04_01_021 RIGHT JOIN TABLE_F041_04_01_022 USING ( A )

statement ok
CREATE TABLE TABLE_F041_04_01_031 ( ID INT PRIMARY KEY, A INTEGER );

statement ok
CREATE TABLE TABLE_F041_04_01_032 ( ID INT PRIMARY KEY, A INTEGER );

# sqlparser-rs unsupported
# query II
# SELECT TABLE_F041_04_01_031.A, TABLE_F041_04_01_032.A FROM TABLE_F041_04_01_031 RIGHT JOIN TABLE_F041_04_01_032 USING ( A ) AS FOO

statement ok
CREATE TABLE TABLE_F041_04_01_041 ( ID INT PRIMARY KEY, A INTEGER );

statement ok
CREATE TABLE TABLE_F041_04_01_042 ( ID INT PRIMARY KEY, A INTEGER );

query II
SELECT TABLE_F041_04_01_041.A, TABLE_F041_04_01_042.A FROM TABLE_F041_04_01_041 RIGHT OUTER JOIN TABLE_F041_04_01_042 ON TABLE_F041_04_01_041.A = TABLE_F041_04_01_042.A

statement ok
CREATE TABLE TABLE_F041_04_01_051 ( ID INT PRIMARY KEY, A INTEGER );

statement ok
CREATE TABLE TABLE_F041_04_01_052 ( ID INT PRIMARY KEY, A INTEGER );

query II
SELECT TABLE_F041_04_01_051.A, TABLE_F041_04_01_052.A FROM TABLE_F041_04_01_051 RIGHT OUTER JOIN TABLE_F041_04_01_052 USING ( A )

statement ok
CREATE TABLE TABLE_F041_04_01_061 ( ID INT PRIMARY KEY, A INTEGER );

statement ok
CREATE TABLE TABLE_F041_04_01_062 ( ID INT PRIMARY KEY, A INTEGER );

# sqlparser-rs unsupported
# query II
# SELECT TABLE_F041_04_01_061.A, TABLE_F041_04_01_062.A FROM TABLE_F041_04_01_061 RIGHT OUTER JOIN TABLE_F041_04_01_062 USING ( A ) AS FOO
