Score:0

AWS Athena Query 2 separate tables together

br flag

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

Score:0
br flag

Solved this issue with INNER JOIN

Added INNER JOIN to my query.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.