I have the current query in athena.
SELECT col1,
col_2,
A.col_3
FROM
(SELECT col_1,
col_3
FROM table_1
JOIN col_3
WHERE col_1 IN
(SELECT DISTINCT col_1
FROM table_2
JOIN table_1
ON table_1.col_1 = table_2.col_1
)
) AS A
LEFT JOIN
(SELECT col_2,
col_3
FROM table_3
JOIN col_3
WHERE col_2 IN
(SELECT DISTINCT col_2
FROM table_2
JOIN table_4
ON table_2.col_1 = table_4.col_1
JOIN table_3
ON table_4.col_2 = table_3.col_2
)
) AS B
ON B.col_3 = A.col_3
Which works in SQLite. But when I run it in AWS Athena I got the following error:
Queries of this type are not supported (Service: AmazonAthena; Status Code: 400; Error Code: InvalidRequestException; Request ID: some_id)
I assume that some part of this query is not supported by AWS Athena, but I am new to the Framework.