Hi,
I have 2 queries from 2 different data sources were I want to group data weekly.
One works fine
image
but second (just in case I’ve add ‘to_date’ formating)
image
gives error

Please advice!

Hi, Welcome

Are both data sources same? It seems like date_trunc function is not available in database you are hitting.

I use 2 different data sources. 2nd one is clickhouse. Is there any other way to apply this function?

Clickhouse uses a different syntax than normal SQL. Their documentation explains how to handle datetime values. If you would date_trunc('month', ...) in normal SQL you would use toStartOfMonth in Clickhouse.

thanks a lot. now it works