Explore ViewQuery Cell: Running SQL or Python on Your Data

Query Cell: Running SQL or Python on Your Data

Whenever you want custom filtering, multi-column aggregations, calculated metrics, or Pandas transformations beyond point-and-click charts, add a Query Cell in SQL or Python. Queries run in isolated cloud compute directly against the dataset attached to your project.

SQL Mode vs. Python Mode

  • SQL (Q): Query your active dataset (dataset) using standard SQL syntax—ideal for SELECT, WHERE, GROUP BY, ORDER BY, COUNT, and AVG aggregations.
  • Python (W): Work directly with your dataset as a Pandas DataFrame (df)—ideal for NumPy/Pandas calculations, custom derived columns, reshaping, and tabular summaries.
Query CellQuery Cell

Writing Queries with AI Assistance

You do not need to memorize SQL or Pandas syntax to use Query Cells:

  • Ask the AI Agent: Describe the calculation or slice you need in plain English, and the AI runs the query and can save it as a Query Cell in Explore.
  • Turn Any Chart into a Query: Click Turn into Query on an existing chart cell to automatically generate the SQL statement behind that chart so you can inspect or customize it.

Turning a Query Result into a Chart Cell

Once a Query Cell returns a data table, click the chart conversion action on the result toolbar to turn it into a visual Chart cell. Clustey automatically detects the returned columns and axes so you can immediately visualize and style the query output.

Credit Usage & Execution Limits

Running a manual SQL or Python Query Cell executes a lightweight cloud compute job (manual_query, requiring a minimal pre-flight credit eligibility check) and consumes credits strictly based on active execution time.

Next, learn how formal statistical test outputs and AI drafts appear inside Explore in Adding Analysis Results to Explore.