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.
Steps
-
Select Sheets / CSV / Block as the source.
-
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}}
). -
In the Parameters section, select Value and choose Sheets as the type.
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
). -
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