AWS Athena Query – How to Query Two Separate Tables Together in AWS Athena

amazon-web-servicescloudquery

I have 2 Tables, and i need to query them together, for example.
From the first table i get results with my query:
InstanceID, title, status and etc…

From the second one:
key, value, region and etc…

I want to make 1 query so i can get the results from both of them.

My 1st query:

SELECT id, status, title, resourceid, accountid
FROM test.awstest01 
WHERE status = 'NoTest' 
AND compliancetype = 'Closed' ORDER BY 1 DESC limit 1000;

2nd query:

SELECT key, value, region
FROM "test777"."awstest05" 
WHERE value = 'Program'
limit 1000;

Any help will be appreciated.

Thanks

Best Answer

Solved this issue with INNER JOIN

Added INNER JOIN to my query.

Related Topic