For the data analysts, data scientists, data engineers, developers and other data specialists. The SQL editor lets you get down with native queries when it isn’t your first rodeo.
Get startedThe flexibility and control you want from writing native queries, made a little cushier.
Create SQL templates by adding variables to your SQL queries. You can add filter widgets to modify the SQL query before it’s run for different results.
Save, reuse, and share bits of SQL code to avoid rewriting the same thing. You can also organize snippets in folders and customize permissions (available on Pro and Enterprise.)
Set up a SQL question to filter a dashboard, as long as it has one or more variable.
Write queries faster with autocomplete for keywords, tables, column names, and more.
Check the data reference in the sidebar for a quick refresher on the exact names of tables and columns as you’re writing a query.
Use models as a jumping off point for asking more complex questions with a SQL query, with the benefit of vetted column definitions.
Click New > SQL Query at the top of Metabase. Note that you won’t see this option if you don’t have native query access. An admin can configure this for you if you need it.
Write your SQL query (if you’re using the SQL editor, you know what to do, don’t let us get in your way).
Click the ▶️ button to view results below.
To turn results into a chart, click Visualization and pick the best fit for your data. You can click around and see a preview below your query.
Save, add to a collection, a dashboard, share, live long and prosper, etc.
Get more granular access to your data with the SQL editor, included on all plans.
Get started