JDBC Driver for Amazon Athena

Build 22.0.8462

JOIN Queries

In Amazon Athena, INNER and OUTER joins are supported.

The following examples use tables in the Northwind database to show how to join Amazon Athena tables:

The query below returns the ContactName and the OrderDate of every customer who has an order:

SELECT Orders.OrderDate, Customers.ContactName 
FROM Customers 
INNER JOIN Orders 
ON Customers.CustomerID=Orders.CustomerID
Or similarly the outer join below returns the ContactName of all customers and the OrderDate of any associated orders:
SELECT Orders.OrderDate, Customers.ContactName 
FROM Customers 
OUTER JOIN Orders 
ON Customers.CustomerID=Orders.CustomerID

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462