Querying your data: SQL, without-SQL, and AI
Analytics with SQL and NoSQL: how relational and document databases handle analytics workloads differently and what each is best for.
Querying your data: SQL, without-SQL, and AI
Quick answers
Can I use analytics tools without knowing SQL? Yes. Metabase's query builder lets anyone filter, group, summarize, and visualize data by clicking through a UI — no SQL required. It covers the majority of common analytical questions. SQL is available for analysts and devs who need it, but it's never required.
What can I do with Metabase without writing SQL? Filter data by any column, group by category or time, calculate sums, averages, and counts, create trend lines and breakdowns, build dashboards, and set up scheduled email reports — all without SQL. For natural language questions, Metabot lets you type a question in plain English and get a chart back.
Does the Metabase query builder support complex analytics? For most common questions — trend analysis, breakdowns, — yes. For advanced logic like window functions, multi-step CTEs, or complex joins, the SQL editor is where those live. Both produce the same output: charts and dashboards that work identically everywhere in Metabase.
Can SQL and no-SQL queries coexist in the same dashboard? Yes. A query builder question and a SQL question look identical on a Metabase dashboard — same visualization options, same subscription support, same permission model. Your PM builds a chart with the query builder; your analyst writes a more complex version in SQL; both go on the same dashboard.
What is Metabot and how does it query data? Metabot is Metabase's AI querying interface. You ask a question in plain English — "show me weekly signups for the last quarter broken down by country" — and get a chart back. Metabot checks existing saved questions first, then generates SQL if needed. It also works in Slack.
How do I make sure everyone gets the same answer regardless of how they query? Use Data Studio to define your canonical metrics once. Every query builder question, SQL question, and Metabot answer that touches that metric draws from the same definition — so the PM, the analyst, and the engineer all see the same number regardless of how they asked.
Can I see the SQL that the query builder generates? Yes. The query builder shows the SQL it generates, and you can copy it directly into the SQL editor as a starting point for more complex queries. It's a useful bridge for people learning to write SQL.
---
Analytics tools used to split into two camps: SQL editors for technical people, drag-and-drop builders for everyone else. The problem is your team isn't split that cleanly — and neither are your questions.
A good analytics platform handles both, without making one audience feel like a second-class citizen.
The three ways to query data in Metabase
1. The visual query builder — for everyone
The query builder lets anyone ask questions by clicking through a UI: pick a table, filter by a column, group by a dimension, choose a visualization. No SQL required.
It covers the majority of analytical questions: counts, sums, averages, trend lines, breakdowns by category or time. For a product manager who needs to know "how many users activated this week, broken down by plan?" — this is the right tool. Two minutes, no ticket to the data team.
The query builder generates SQL under the hood. You can see it, copy it, and use it as a starting point for a more complex query if you need to.
2. The SQL editor — for analysts and devs
The SQL editor is a full native query interface. Write SQL against your actual database — Postgres, MySQL, BigQuery, Redshift, whatever you're running. Autocomplete on table and column names, syntax highlighting, saved snippets for common query patterns.
Results come back as a table you can visualize, save as a chart, or pin to a dashboard. SQL questions work the same way as query builder questions everywhere else in Metabase — they can be shared, subscribed to, or used as a data source for another question.
3. Metabot — for natural language
Metabot lets you ask questions in plain English and get a chart back. "Show me weekly signups for the last quarter broken down by country" → query → visualization, without touching the query builder or writing SQL.
Metabot checks your existing dashboards and saved questions first — so if the answer already exists, it surfaces it instead of running a new query. It also generates SQL for questions that need it, which you can inspect and edit before running.
Metabot works in Metabase's UI and in Slack — your team can ask data questions without leaving their chat window.
How the three interfaces coexist
The key design decision in Metabase is that all three interfaces produce the same outputs: saved questions, charts, dashboard cards.
A query builder question and a SQL question look the same on a dashboard, behave the same in subscriptions, and share the same permission model. A non-technical teammate can build a chart with the query builder; a data analyst can write a more complex version in SQL; both live in the same collection, both feed the same dashboard.
When to use which
| Situation | Best interface |
|---|---|
| Quick answer, common question | Query builder |
| Complex joins, window functions, CTEs | SQL editor |
| Non-technical teammate needs self-serve | Query builder |
| Saved snippets for reusable logic | SQL editor |
| "Just ask the question" in plain English | Metabot |
| Exploring unfamiliar data | Query builder or Metabot |
| Production-grade metric definition | SQL editor via Data Studio |
The semantic layer underneath
For teams who want consistent answers regardless of which interface someone uses, Data Studio is where you define the canonical version of your metrics. Define "active user" once — as a SQL or Python transform — and every query builder question, SQL question, and Metabot answer that touches that metric draws from the same definition.
---
Key takeaways
- Query builder covers most analytical questions without SQL — filter, group, summarize, visualize