Query Data with SQL Worksheet

Use SQL Worksheet to explore database objects, run SQL, interpret query results, and generate AI-assisted queries from natural language.

Before You Begin

Ensure that:

Browse SQL Worksheet

On the Data Studio home page:

  1. Open the SQL Worksheet card or select SQL Worksheet in the left navigation. If prompted, connect to a database by entering a database user name and password.

    SQL Worksheet includes Catalog and Worksheets tabs so that you can browse database objects while you work with queries.

  2. Enter your query in the editor.

  3. Click Run SQL to execute the query.

Query a Table or View from Catalog

The Catalog tab is useful when you want to find a table before writing a query.

  1. In SQL Worksheet, open the Catalog tab.

  2. Expand the connected database and schema.

  3. Click the table or view to enter the query. You can also manually write or edit queries in the editor.

  4. Click Run SQL to execute the query.

View Query Result

After you run the query, you can view the result and related details in the results panel:

Visualize Query Results

SQL Worksheet can display supported query results as charts or graphs. Select a visualization option in the result toolbar, then select the columns and settings that you want to use.

Description of the illustration sql-worksheet-result-visualization.png

For more information, see The SQL Page.