# F041-07: The inner table in a left or right outer join can also be used in an inner join

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

query I
SELECT TABLE_F041_07_01_011.A FROM TABLE_F041_07_01_011 INNER JOIN TABLE_F041_07_01_011 AS TABLE_F041_07_01_012 ON TABLE_F041_07_01_011.A = TABLE_F041_07_01_012.A

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

query I
SELECT TABLE_F041_07_01_021.A FROM TABLE_F041_07_01_021 INNER JOIN TABLE_F041_07_01_021 AS TABLE_F041_07_01_022 USING ( A )

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

# sqlparser-rs unsupported
# query I
# SELECT TABLE_F041_07_01_031.A FROM TABLE_F041_07_01_031 INNER JOIN TABLE_F041_07_01_031 AS TABLE_F041_07_01_032 USING ( A ) AS FOO

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

query I
SELECT TABLE_F041_07_01_041.A FROM TABLE_F041_07_01_041 JOIN TABLE_F041_07_01_041 AS TABLE_F041_07_01_042 ON TABLE_F041_07_01_041.A = TABLE_F041_07_01_042.A

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

query I
SELECT TABLE_F041_07_01_051.A FROM TABLE_F041_07_01_051 JOIN TABLE_F041_07_01_051 AS TABLE_F041_07_01_052 USING ( A )

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

# sqlparser-rs unsupported
# query I
# SELECT TABLE_F041_07_01_061.A FROM TABLE_F041_07_01_061 JOIN TABLE_F041_07_01_061 AS TABLE_F041_07_01_062 USING ( A ) AS FOO
