Google Sheets has a QUERY
function that can be used for writing SQL queries. It uses the Google Visualization API Query Language, which is unfortunately a pretty limited SQL dialect. A few options for writing more complex SQL queries:
- Export to CSV and load into a database somewhere
- Pros: Use whatever database you want
- Cons: Have to re-export every time the data is updated
- Load into BigTable
- Pros: Automatically updates
- Cons: Requires some Google Cloud setup
- Load into Google Colaboratory ("Colab")
- Pros: Very flexible, as you can use SQL, Pandas, or any other Python code/packages
- Cons: Jupyter Notebooks (which Colab is built on) can take a little getting used to
The Notebook above shows the quickest path to getting that data into SQLite on Google Colab, which can be done in a matter of minutes. To get started, open the Notebook below in Google Colab.