SQL on Google Sheets: How to Query Data in Google Spreadsheets

Shuveb Hussain

This article is part of a series on Pervasive SQL– the Zipstack philosophy of leveraging SQL for a wide range of data engineering-related tasks.

SQL on Google Sheets: How to Query Data in Google SpreadsheetsSQL on Google Sheets: How to Query Data in Google Spreadsheets

New mobile apps to keep an eye on

Hendrerit enim egestas hac eu aliquam mauris at viverra id mi eget faucibus sagittis, volutpat placerat viverra ut metus velit, velegestas pretium sollicitudin rhoncus ullamcorper ullamcorper venenatis sed vestibulum eu quam pellentesque aliquet tellus integer curabitur pharetra integer et ipsum nunc et facilisis etiam vulputate blandit ultrices est lectus eget urna, non sed lacus tortor etamet sed sagittis id porttitor parturient posuere.

  1. Lorem ipsum dolor sit amet consectetur rhoncus ullamcorper ullamcorper
  2. Mauris aliquet faucibus iaculis dui vitae ullamco
  3. Posuere enim mi pharetra neque proin vulputate blandit ultrices
  4. Posuere enim mi pharetra neque  pellentesque aliquet tellus proindi

What new social media mobile apps are available in 2023?

Sollicitudin rhoncus ullamcorper ullamcorper venenatis sed vestibulum eu quam pellentesque aliquet tellus integer curabitur pharetra integer et ipsum nunc et facilisis etiam vulputate blandit ultrices est lectus vulputate eget urna, non sed lacus tortor etamet sed sagittis id porttitor parturient posuere.

Posuere enim mi pharetra neque proin vulputate blandit ultrices

Use new social media apps as marketing funnels

Eget lorem dolor sed viverra ipsum nunc aliquet bibendum felis donec et odio pellentesque diam volutpat commodo sed egestas aliquam sem fringilla ut morbi tincidunt augue interdum velit euismod eu tincidunt tortor aliquam nulla facilisi aenean sed adipiscing diam donec adipiscing ut lectus arcu bibendum at varius vel pharetra nibh venenatis cras sed felis eget.

  • Lorem ipsum dolor sit amet consectetur fringilla ut morbi tincidunt.
  • Mauris aliquet faucibus iaculis dui vitae ullamco neque proin vulputate interdum.
  • Posuere enim mi pharetra neque proin  bibendum felis donec et odio.
  • Posuere enim mi pharetra neque proin aliquam mauris at viverra id mi eget.
“Eget lorem dolor sed viverra ipsum nunc aliquet bibendum felis donec et odio pellentesque diam volutpat.”
Try out Twitter Spaces or Clubhouse on iPhone

Nisi quis eleifend quam adipiscing vitae aliquet bibendum enim facilisis gravida neque velit euismod in pellentesque massa placerat volutpat lacus laoreet non curabitur gravida odio aenean sed adipiscing diam donec adipiscing tristique risus amet est placerat in egestas erat imperdiet sed euismod nisi.

What app are you currently experimenting on?

Eget lorem dolor sed viverra ipsum nunc aliquet bibendum felis donec et odio pellentesque diam volutpat commodo sed egestas aliquam sem fringilla ut morbi tincidunt augue interdum velit euismod eu tincidunt tortor aliquam nulla facilisi aenean sed adipiscing diam donec adipiscing ut lectus arcu bibendum at varius vel pharetra nibh venenatis cras sed felis eget.

For instance to do the following using just SQL:

  • Extracting data
  • Loading data
  • Transform data
  • Join data between arbitrary sources
  • Build data products 
  • Specify permissions
  • Do reverse-ETL

In a previous article, we saw how to query SaaS applications, particularly Salesforce live using SQL. In this, we will see how to include a “non-traditional” data source such as Google Sheets as part of your data engineering workflow seamlessly.

Spreadsheets are super important since non-technical business users love them for all sorts of reasons. Rather than fight their use, wouldn’t it be great to include them tightly and seamlessly into your pipeline? This is where Zipstack’s ability to query 270+ sources live with SQL comes in very handy. There is no need to first centralize the data into a data warehouse. If you did that, you’d lose the ability to include the latest data into your pipeline. Because Zipstack can query any source live, you enable your business to run on the latest data.

Imagine a business user in Finance, Janet, who at the end of the day, fills in final currency exchange rates into a Google Sheets spreadsheet. To generate daily reports, this data would then have to be considered in currency exchange rates conversion queries. With Zipstack, you can refer to Google Sheets spreadsheets as if it were a regular database. Zipstack allows you to connect to any data source using JDBC or the PostgreSQL protocol.

There is no way we can convince business users to learn more complex tools. In the other direction, it becomes cumbersome for data engineers to build pipelines with custom tools that read from spreadsheets. But, with Zipstack’s ability to query data in spreadsheets with just SQL, we enable business users to seamlessly participate in business data workflows. It’s a win-win for both data engineers and business users!

In the video below, we demonstrate the example workflow we discuss above. We see just how simple it is to connect to Google Sheets and then query data from there live.