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