@louisc Here's the trick. Replace {{variable}}
with whatever it is supposed to represent (eg. 'text'
) and remove the optional clauses. If the query works, then you know it's correct.
Please read:
https://www.metabase.com/docs/latest/users-guide/13-sql-parameters.html
https://www.metabase.com/learn/sql-questions/sql-variables.html
https://www.metabase.com/learn/sql-questions/field-filters.html
They will teach you a lot about how variables works.