With SeekWell you can query your Airtable bases (including across multiple bases) using plain SQL (SQLite flavor).

<aside> 💡 To test this on an example Base, copy the Sales CRM Base in the Airtable Templates

</aside>

https://youtu.be/m-uygyDjV0A

Connecting

  1. In SeekWell, go to Source → "Add source" in the top right of the app

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8902757d-70ff-4548-9a28-31b341618ef6/Untitled.png

  2. Add your Airtable API key to the source

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/171534af-2e9d-4d60-937c-7d939aa0dc76/Untitled.png

    You can get your API key here on your account page (Click on "Generate key" if one isn't already there

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/aa6441ba-dd07-4530-828e-f4f7c65ba336/Untitled.png

  3. Go to https://airtable.com/api and click on the base you want to connect to. Check the URL for the Base / App ID, it start with "app". It's also shown in green on this page in third paragraph

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/fe3596ca-d49a-4020-80a7-a41665cd3c42/Untitled.png

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b8776407-d577-4bbd-b865-fc2f4bbbfd38/Untitled.png

  4. Write some SQL! Use the Base ID (appkLTrRdxeM51z0P in this example) as the SQL schema name and the table name to test a SELECT statement

    select *
    from ***appREPLACEWITHYOURID***."Opportunities"
    limit 10
    

    <aside> 💡 Double quotes (") are required for Tables with space(s) in the name. For example, a table name of "This Has Spaces" will be SELECT * FROM apppId."This Has Spaces"

    </aside>

Joining Tables

  1. SeekWell adds two special columns to your Table:

    You can use these like any other column

  2. In the Sales CRM Base, there is an Accounts table and a Contacts table. To join them, let's use the first id of the first linked Contact and get their Name

    select 
    a.__id as account_id,
    a.__createdTime as account_created_on,
    a.Size as size,
    substr(a.Opportunities, 3, 17) as first_op,
    substr(a.Contacts, 3, 17) as primary_contact,
    c.Name as contact_name
    from 
    ***appREPLACEWITHYOURID***."Accounts" as a inner join 
    ***appREPLACEWITHYOURID***.Contacts as c on substr(a.Contacts, 3, 17) = c.__id
    limit 10
    

    <aside> 💡 This substr is necassary because Airtable return a linked records as an array. This substring gets just the id of the first item in the array

    </aside>