1. SQL Queries

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/4799ccdd-9109-434a-8a15-27c30e03ec83/Screenshot_2020-04-06_at_15.07.55.png

How to Use Queries

We have created a Google Function or formula, just like =sum(A1:A10) or =average(A1:A10) that will allow you and your team to pull the data with a formula directly on the spreadsheet. This function is called =sage() and takes 5 parameters:

=sage("Data Source", # of Rows, # of Columns, "SQL Query", [today()])

Schema

Your Hubspot data is stored in a database with a specific schema (columns and tables) corresponding to the entities we are getting from Hubspot. In order to get your table and column names, go to this spreadsheet and copy the tab (schemas) to a spreadsheet where you have the Demand Sage plugin installed:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3e84521e-034d-4777-bc0d-54e15905b2f9/copy-sheet.gif

<aside> 💡 Note: This specific spreadsheet is empty and the data will only appear once you have copied this over to a working spreadsheet with Demand Sage installed.

</aside>

Parameters

Data Source (text) - refers to the data source you want to run the query for. Currently we only support "hubspot" as a value, but we are working on adding more sources in the near future.

Tell us what sources you'd like us to add 👉Tell us now!