> 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="https://544419862-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA6yhE6HfjtfdPqgvKNnu%2Fuploads%2FkyopIANbHKOka1CBQwgV%2FGlint%20QSG%2032.png?alt=media&amp;token=1711e943-e290-49a0-8dae-13bda2219abb" 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.
