Joins

Join across tables or datasources with or without SQL

πŸ“˜

Workspaces will migrate to a new and improved query experience, starting the week of May 15, 2024. For more, see this help doc.

With Equals, it's easy to combine data across your connected datasources. For example, you could combine data from Stripe and Salesforce in the same spreadsheet to perform deeper analyses.

There are two ways to join data in Equals:

  1. Using the query builder (no code)
  2. Using the SQL editor

Query builder joins

The Query builder allows you to combine data from different tables in your connected databases (e.g. Postgres, Redshift) or across connected cloud apps (e.g. Stripe, Segment) without using SQL.

Once your datasources are connected, you can create a new query in a workbook using the query builder or start with a saved query.

Select Join data and specify the connection you'd like to set up. An example could be joining between one Postgres table and another Postgres table, or it could be joining a Stripe table with a HubSpot table. You'll want to specify the column that is the same in each datasource for the join to work. For example, the ID in Stripe should match the ID in HubSpot.

Note that the query from each datasource will need to have the column shared by both sources selected.

SQL editor joins

Combine data across datasources by writing traditional SQL against supported datasources.

To get started, connect a datasource to a sheet in your workbook and select the SQL Editor. Then, to view the fields you want to join, open the table browser and select the additional datasource you want to join.

Supported datasources

The query builder can join across any datasource, including saved queries (if the saved queries were generated using the query builder). The SQL editor can join across the supported datasources below:

  • Stripe
  • Xero
  • Quickbooks
  • Intercom
  • HubSpot
  • Zendesk Support
  • Salesforce
  • Twitter Ads
  • Facebook Ads
  • Google Ads
  • Shopify

Types of joins

In the query builder, you can choose the type of join you want to set up:

  • Left Join
    A left join returns all the records from the left table and matching records from the right table. If there are no matching records in the right table, then null values are returned for those columns.
    ​
  • Right Join:
    A right join is similar to a left join but returns all the records from the right table and matching records from the left table. If there are no matching records in the left table, then null values are returned for those columns.
    ​
  • Inner Join:
    An inner join returns only the matching records from both tables. Records that do not have a match in the other table are not included in the result set.
    ​
  • Outer Join:
    An outer join returns all the records from both tables and includes null values for columns where there is no match.

Note that the SQL editor only supports Left Joins.