DATE_TRUNC not working in some dbs

Hey everyone, I'm new to Metabase.
I can see in the Help that DATE_TRUNC is introdcued to work with date type, and it works for me in the "Sample Database" from metabase.
but when I go to my tables, it generates this error:
FUNCTION mydbname.DATE_TRUNC does not exist

My query is this:
select user_id, event_name, DATE_TRUNC('month', date) AS month
from user_tracker
limit 10;

And I have these columns in my table: user_id, event_name & date

Hi @mehdimeskin
When you create a SQL query, then Metabase sends that query to your database, so any functions used depends on your database. Have a look in your database documentation.

1 Like