The 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.
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.