Documentation

Cell references

Modify a SQL query by inputting values in your workbook

Cell references allow you to modify a value in a SQL query by simply typing into the referenced cell in your workbook. This enables anyone with edit access to your workbook to modify specific values in your SQL queries, without the need to open up access to your query or create multiple versions of the same query. You can set up cell references to toggle values like dates, products, locations, plan type, and more.

To get started, set up a live datasource connection to a workbook. Once you have a connection set up, you can refer to cells in your workbook to filter your queries by inputting values into those cells. Note: to use this functionality, you must write your query using the SQL editor.

To get started:

  1. Use the SQL editor to write a query that pulls data from a connected datasource.
  2. Set up the condition in your SQL query that you want to use with a cell reference. In this case, we have a WHERE statement that we want to use to filter stripe_charges data by plan type.
  3. Click on the {:} icon in the SQL editor toolbar to insert a cell reference in your query.
  4. Select the cell in your workbook to reference (in this case, cell A1). Type a value to filter your query on into the referenced cell and click Run Query.
  5. The results of our query will be filtered by the plan type as specified in cell G6 (in this case, proplans).