---
title: "Overview"
space: "Insights"
url: "https://docs.frappe.io/insights/querying/overview"
updated: "2026-01-06"
---

## What are Queries?

Queries let you fetch and transform data from your databases. Think of a query as a recipe for getting the exact data you need. You start with a table then add steps to filter, calculate, and organize the data.

Insights offers three ways to build queries:

  1. Query Builder  Visual, no-code interface (recommended for most users)
  2. SQL Editor  Write SQL directly (for SQL experts)
  3. Script Editor  Python scripts for complex transformations

## Creating Your First Query


<video controls width="100%" height="auto"><source src="/files/query.mp4" type="video/mp4"></video>
### Start a New Query
####  1. Open your workbook

1. Click the Queries tab
2. Click New Query
3. Choose your query type:
    * Visual Query Builder  -> Build visually
    * SQL Editor  -> Write SQL
    * Script Editor  -> Write Python

![Query Builder](/files/Query_Builderfe073a.jpeg)

 We'll focus on the Query Builder since it's the easiest to get started with.

####  2. Select Your Data Source

  1. Click Select a table
  2. Choose your database connection
  3. Pick a table to start with

![select table](/files/select%20table.jpeg)

You can select a table from:

* Demo Data
* Site DB
* Uploads
* Other Queries in the WorkBook

Now you're ready to perform operations on the table
