Analytics & Intelligence

Metabase Query Builder: Guide for Non-Technical Teams

L
Lena Hartmann
··10 min read
Step-by-step guide to using the Metabase query builder. Filter data, summarize, group by category, join tables, and save questions. No SQL required.
TL;DR
  • The Metabase query builder is a visual interface for building data questions without SQL code, using a notebook-style flow: pick data, filter, summarize, join, and save.
  • Non-technical teams can filter by date, product, or customer; summarize into counts, totals, and averages; and group by categories in seconds.
  • Saved questions become reusable assets: add them to dashboards, share with the team, and let colleagues adjust filters without touching the query.
  • Use the query builder for filtering, counting, summing, and simple joins; switch to SQL for window functions, CTEs, and complex logic.
  • Viewing the generated SQL behind your clicks teaches SQL syntax gradually without forcing you to write it from scratch.

The Metabase query builder is a visual interface for asking questions about your data without writing SQL code. It is designed for non-technical team members who want to pull specific data, filter it, and build reports without touching code. This guide walks you through every core feature step by step.

What is the Metabase Query Builder? (And Why It's Not SQL)

The Metabase query builder, also called the notebook editor, is a visual tool where you click buttons and select fields instead of typing SQL code. You start by picking a table, then layer on filters, summarize the data, join other tables, and save the result as a "Question." That Question becomes the foundation for dashboards, alerts, and team reports.

Most Metabase users never touch SQL. The query builder covers 80% of the analytics questions a business team needs to answer: "How many orders came in this month?" "What is our churn rate?" "Which customers spent the most?" These questions take seconds to build in the visual editor.

When you build a question in the query builder, Metabase translates your clicks into SQL behind the scenes. You can view that SQL any time, which makes the query builder a safe way to learn SQL without being forced to write it. But for now, think of the query builder as a layer on top of SQL that shields you from the complexity.

The query builder is "destructive-free." You cannot accidentally delete data or corrupt a table. You can only read data. This is why it is the standard tool for non-technical teams. Your CFO cannot break your database by exploring revenue numbers.

Picking Your Data: The First Step

Every question starts with "Pick a table." A table is a collection of rows and columns. If you have a "customers" table, each row is a customer, and each column is a property (name, email, signup date, etc.). In a managed Metabase setup like the one at Opsily, your tables are already connected and visible in the query builder.

When you open Metabase and click "New Question," the first step is "Pick data." You see a list of tables. Let us say you have a "sales_orders" table. Click it. Metabase shows you a preview of the raw data: all rows, all columns. Do not worry. You will filter this down in the next steps.

You can also start with a "Model" or a "Saved Question." A Model is a cleaned-up version of a table (e.g., a "orders_by_month" model that already has junk rows removed). A Saved Question is a question someone else built and saved. Starting with a Model or Saved Question is often faster than starting with a raw table because someone has already done the prep work.

Once you pick your data source, Metabase loads a summary: "This table has 50,000 rows and 12 columns." You are now ready to filter.

Filtering Data: Asking Questions Like "Show Me Orders from This Month"

Filters narrow your data. Without filters, you see all 50,000 orders. With a filter, you might see only the 300 orders from the last 30 days.

Click the "Filter" button. A panel opens asking "Which field do you want to filter?" You see a list of all columns in your table. Let us say you pick "Order Date." Metabase asks "How do you want to filter it?" You have options:

  1. Specific range (e.g., last 30 days, last quarter).
  2. Relative date (e.g., "any time after December 1, 2025").
  3. Exclusion (e.g., exclude all orders from China).

For a date filter, pick "Last 30 days." Metabase applies the filter. The data updates instantly. You now see only recent orders.

You can add multiple filters. Click "Filter" again and pick another column, say "Order Status." Filter to show only "Completed" orders. Now your data is orders from the last 30 days that are completed. Each new filter is an AND: it narrows further.

Do not be afraid to experiment. Filters are reversible. Add a filter, see the data, remove it if you change your mind.

Summarising and Grouping: "How Many Orders per Customer?"

Summarization turns raw data into counts, totals, and averages. Without summarization, you see individual rows. With summarization, you see "Total Revenue: $450,000."

Click the "Summarize" button. Metabase asks "What do you want to know?" You have choices:

  1. Count (how many rows?).
  2. Sum (total of a numeric column, like order value).
  3. Average (mean of a numeric column, like revenue per order).
  4. Min/Max (lowest or highest value).

Let us say you pick "Sum of Order Value." Metabase calculates the total. Now you see one number: the total revenue across all filtered orders.

But often you want to see totals broken down by a category. This is where "Group By" comes in. After you pick your summary (Sum), click "Group By." Choose a field, like "Product Category." Now you see a table: each row is a product category, and the revenue for that category. You might see:

  • Electronics: $200,000
  • Clothing: $150,000
  • Home & Garden: $100,000

You can group by multiple fields. Group by both "Product Category" and "Month." Now you see revenue by category by month. This is the foundation of most business reports.

Advanced Moves: Joins, Custom Columns, and Sorting

Joins combine two tables. Imagine you have an "orders" table and a "customers" table. You want to see order revenue alongside customer geography. A join links the two tables on a shared column (usually customer_id).

Click "Join data." Metabase asks which table to join. Pick "customers." Then tell Metabase how to link them: "orders.customer_id = customers.id." Metabase connects the tables. Now your data includes both order and customer information.

Custom columns let you create new fields on the fly. You might want "Revenue Minus Cost" to see profit per order. Click "Custom column," name it "Profit," and write a formula: "[Order Value] - [Product Cost]." Metabase calculates it for every row. You now have a new column you can filter, summarize, or sort by.

Sorting organizes your results. After you summarize (e.g., total revenue by category), click "Sort" and pick "Revenue, highest first." The categories reorder so the highest-revenue category is at the top. This takes seconds and makes reports much more readable.

Saving, Sharing, and Reusing Questions

Once you build a question, save it. Click "Save." Name it something clear: "Monthly Revenue by Product" beats "Report 1." Write a brief description so teammates understand what the question answers. Save it.

Now that question is a reusable asset. You can add it to a dashboard. Click the question, then "Add to Dashboard," and choose or create a dashboard. The question becomes a card on that dashboard. Other team members can view it, drill into the data, or download it as CSV.

You can also set up filter variables. When you save a question, click "Make this question editable by others." Now teammates can open the question, change the date range or product category, and see new results without editing the underlying query. This is how self-service analytics works. One person builds the structure; everyone else uses it.

Share the dashboard by copying a link. You can restrict who can see it (team members only) or make it public. Metabase handles permissions at the database level, so teammates only see data they have access to.

Viewing the Generated SQL (And Learning as You Go)

Metabase translates every click into SQL. To see what is happening under the hood, click the "Native Query" button (or "SQL" in some versions) after you build your question. The SQL appears.

At first, the SQL might look dense. But you will recognize patterns. A filter becomes a WHERE clause. A summarization becomes a COUNT, SUM, or AVG. A join becomes a JOIN. Reading this SQL teaches you SQL syntax without forcing you to write it from scratch.

You cannot edit the SQL in this view if you came from the visual builder (it is read-only). But you can copy it and paste it into a SQL editor to experiment, or you can start fresh in the SQL editor and write native queries directly.

This is the best way non-technical people learn SQL: build a question visually, see the SQL, understand it, rinse, repeat.

When to Switch to the SQL Editor (And How)

The query builder covers most use cases. But some questions need SQL.

Use the query builder if you are:

  • Filtering and counting rows.
  • Summing or averaging a column.
  • Grouping by a category.
  • Joining two or three tables.
  • Creating a simple custom column.

Switch to SQL if you need:

  • Window functions (ranking rows, running totals).
  • Common Table Expressions (CTEs, also called "with" clauses).
  • Complex unions (combining multiple queries).
  • Recursive queries or very deep nesting.
  • Conditional logic too complex for a custom column.

For example, if you want to rank customers by total lifetime value (higher rank = more valuable), you need a window function like ROW_NUMBER(). The query builder cannot do this. You open the SQL editor and write:

SELECT
  customer_id,
  lifetime_value,
  ROW_NUMBER() OVER (ORDER BY lifetime_value DESC) as customer_rank
FROM customers

Once you write SQL in the SQL editor, you can still save it, add it to dashboards, and share it. There is no one-way gate. You can also convert a query builder question to SQL (click "Convert to native query"), edit it, and save it as a SQL question.

Most teams use both. New questions start in the query builder. As requirements get complex, you switch to SQL. This is the natural progression.

Frequently Asked Questions

How do I create an example with the Metabase query builder?

Start by picking the sample database that ships with Metabase (most instances include one). Click "New Question," then "Pick Data," and choose "Sample Database > Orders." Build a simple question: pick a date filter (last 30 days), then summarize (count of rows). Click "Visualize." You now have a count of orders from the last month. Save it. This takes two minutes and shows you the full flow.

How do I group by (summarise) data in Metabase?

Click "Summarize" after picking your data. Choose an aggregation (Count, Sum, Average, etc.). Metabase shows a single number. If you want a breakdown, click "Group By" and pick a field (e.g., Product Category). Now you see a table with one row per category and the aggregation for each.

How do I use variables/filters in Metabase questions?

When you save a question, check the box "Make this question editable by others." Save it. When teammates open the question, any filter you added becomes a dropdown they can change. They can pick a different date range, customer, or product and see new results. This is done automatically; you do not need to set it up explicitly.

When should I use SQL instead of the query builder?

Use SQL when the query builder cannot express what you need: window functions, CTEs, complex conditional logic, or very deep joins. Start in the query builder. As you encounter limitations, switch to SQL. There is no penalty for using both.

How do I save and reuse a question?

After you build a question (pick data, filter, summarize), click "Save." Give it a name and description. Save it. The question becomes an asset in Metabase. You can add it to dashboards, share it with the team, or use it as the starting point for a new question. Click the question later and click "Use as a base for a new question" to build on it.

The Bottom Line

The Metabase query builder is the fastest way for non-technical teams to answer data questions without writing code. It hides SQL complexity while letting you learn it gradually. Start with simple questions (pick a table, filter, count), then layer on summarization and joins as your confidence grows.

If you do not have Metabase set up yet, managed Metabase hosting at Opsily eliminates deployment overhead and gives you GDPR-compliant data storage. Explore Opsily's managed Metabase hosting to get started with a fully deployed instance today.

Deploy Metabase in minutes
Opsily's managed Metabase hosting includes GDPR compliance, flat pricing, and zero infrastructure overhead.
Get Started Free

Ready to self-host your own apps?

One server. Multiple apps. No per-app fees.

Get started →