WIKI: query issues (SQL/others)

OK - here the first wiki for a category: query issues (SQL/others) as suggested by @EvaS here: Increase number of categories on forum?

@evaS: thanks @jornh! As soon as I find some time I might start with describing how filters work as I think this is something a lot of new users struggle with.

@jornh: OK cool don’t forget to point to that people should also Read The Fine Manual where appropriate. But I guess if you feel like sharing and adding more tutorial style or tips&tricks info a lot of peeps would appreciate that very much. (Myself as a relative SQL noob including) … and remember do it on your own time - as you feel like it - don’t feel pressure - ever!

The totally awesome beginners guide to how filters in Metabase work

TODO :construction_worker_woman: :construction_worker_man:

apart from the info on filters in the user guide … here are a few things that we learned the hard way over time worth sharing …

it might be obvious but there is a different syntax you need to use depending on what filter you want to create:
Field filters: AND {{variable}}
Text filters: AND field_name = {{variable}}

SQL tips&tricks solutions to overcome or work around current limitations:

How to link Dashboards - workaround:

When using filed filters in a sql query with joined tables, you can´t use table aliases:

Building a SQL Syntax with rolling last 12 months:

Compare values from two time periods:

Using 2 databases in the same question

how to created views without admin permissions

Moving all the questions in a dashboard down to make empty space at top

You know how to express it in SQL, now how do you Meta-re-base it?

SQL’s IN operator - mapped to Metabase multiselect dropdowns

1 Like