Documentation

Joins

Join across tables or datasources with or without SQL

With Equals, it's easy to combine data across Equals Warehouse supported 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.

Select Join column 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.

Next, select the columns from the new datasource to join with your existing dataset. You'll also want to specify a join key: the column with matching values in both datasources to join on. For example, the ID in Stripe should match the DEAL_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

Currently, the query builder supports LEFT joins. Any type of join is supported from the SQL editor.

  • 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.