Query Sheets using SQL

Introduction

With SeekWell you can query a Google Sheet using plain SQL (SQLite to be specific) and send the results of the query to another Sheet. You can also send the results using Slack or email.

Demo

Steps

  1. Select Sheets / CSV / Block as the source.

    Select Sheets/CSV/Block as source

  2. Add a Sheet to your from statement by typing {{NAME}}. Replace NAME with a one-word short reference to the Sheet or table (for example, {{users}}).

  3. In the Parameters section, select Value and choose Sheets as the type.

    Select Sheets under Value

    If your data starts in A1 and there is only one table in the sheet, you can use the Sheet name. Otherwise you need to specify the range for your table (e.g. revenue!A:C).
  4. Complete the rest of your SQL statement.

Tips and tricks

  • You must use a SQL alias for the Sheet or table (for example, from {{users}} as u).

  • You can use this feature to email a summary of a Sheet via a Story, or a full table as a CSV.

    select r.email,  u.channel
    from
    {{revenue}} as r inner join
    {{users}} as u on r.email = u.email
    limit 10

Was this page helpful?