> For the complete documentation index, see [llms.txt](https://glint-analytics.gitbook.io/glint-analytics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glint-analytics.gitbook.io/glint-analytics/querying-and-data-analysis/writing-queries/using-the-query-builder.md).

# Using the Query Builder

### **Using the Query Builder**

When you click Query Builder (to the right of the AI Assistant / SQL / Results tabs), a full-screen interface appears. This is a visual tool that helps you construct queries with more control. The Query Builder screen is divided into three main sections. Here’s how it works.

<figure><img src="/files/YB3FVZXSD4wWSsey8R9b" alt=""><figcaption><p>Query Builder</p></figcaption></figure>

**Left Column: Visualization and Data Table**

* Chart (Top)\
  Displays a visual representation of your query results, such as a line or bar chart.
* Data Table (Bottom)\
  Shows the raw or aggregated data used by the chart. Each row and column corresponds to the fields and filters defined in your query.

**Center Column: Query Composer and AI Assistant**

* Query Panel (Top)\
  Displays the SQL code that runs behind the scenes. You can edit this code manually or let the AI Assistant generate it for you.\
  A Run Query button often appears here, allowing you to execute or re-run your query.
* AI Assistant (Bottom)\
  Provides a conversational interface where you can type requests in natural language. The AI will respond by generating or modifying the SQL query in the panel above.

**Right Column: Schema Browser, Tables, and Descriptions**

* List of Available Tables\
  Shows database tables like BLOCKS, TRANSACTIONS, and others, each with expandable sections to reveal columns and descriptions.
* Contextual Info\
  Provides brief explanations or documentation about the data, helping you understand each table’s purpose or schema.

**How It All Works Together**

* Left: Visualize and confirm your data (chart + data table).
* Center: Manage your query, either via direct SQL edits or the AI Assistant’s help.
* Right: Explore available tables and columns, expanding them to decide what data you want to include.

**Exploring the Schema**

In the right column of the Query Builder, you’ll see a list of available tables, each containing specific data about the blockchain. Selecting a table (e.g., BLOCKS) displays its columns and a short description. These details help you decide which fields to include in your queries.

We’ll go through each table one by one to give you a clear understanding of all available data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://glint-analytics.gitbook.io/glint-analytics/querying-and-data-analysis/writing-queries/using-the-query-builder.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
