Skip to main content
Prerequisite: Before querying, complete the Google Sheets integration.

Querying Google Sheets

1
On the home page, click + New Doc in the upper right corner of the screen.
New Doc button
2
Click the + button in the Tiles panel on the left sidebar and choose SQL.
Add SQL tile
3
Copy the Google Sheet ID from the sheet’s URL. Ensure the Google Sheet access is set to Public (Anyone with the link).
Google Sheet URL with ID
4
Enter the code below and click Run.
select
*
from
read_gsheet('<insert GSheet ID here>')
Google Sheet query results
You’re ready to query your data using SQL.
For more options on how to read or write Google Sheets with SQL, refer to the DuckDB Google Sheets documentation.