Querying Our Data

Once you’ve explored and selected a dataset, you can query the data directly through the Chart Builder or SQL Lab for deeper analysis. Follow these steps to get started.


Querying with Chart Builder

The Chart Builder allows you to create queries and visualizations without writing SQL code. Here’s how:

Step 1: Select a Chart Type

  1. Navigate to the Create Chart page by selecting a dataset.

  2. Choose a chart type (e.g., Table) from the list of available visualizations.

    Select Chart Type


Step 2: Configure Query Settings

  1. Select Query Mode: Choose between Raw Records or Aggregate.

  2. Choose columns to display in your chart by dragging them to the Columns section.

  3. Add filters and ordering options as needed:

    • Filters: Limit your dataset based on specific criteria (e.g., date range, category).
    • Ordering: Define how the data should be sorted (e.g., descending by date).

    Query Configuration


Step 3: Create and View Chart

  1. Set a row limit for your query (default is 100).

  2. Click Create Chart to execute your query and preview the results.

    Create Chart

  3. Save the chart or modify it further as needed.

    Preview Chart


Querying with SQL Lab

For advanced users who prefer direct control over queries, the SQL Lab provides a robust interface to write SQL code.

Step 1: Open SQL Lab

  1. From the Datasets page, select View in SQL Lab for your chosen dataset.

  2. Alternatively, access SQL Lab from the top navigation menu under SQL.

    Open SQL Lab


Step 2: Check Dataset Schema

  1. View the dataset schema to see available columns and their data types.

  2. This helps you understand the structure of the data before writing queries.

    View Schema


Step 3: Write and Execute Queries

  1. Write your SQL query in the editor (e.g., SELECT * FROM dataset_name WHERE column_name < value).

  2. Click Run to execute the query and view results in the results panel.

  3. Use features like Create Chart, Download to CSV, or Copy to Clipboard for further actions.

    Write Query


Query Result


Next Steps

Once you’ve queried your data, explore how to Create Dashboards to visualize and share your insights.