Skip to content

Tag: snowflake-cloud-data-platform

Variable in dateadd function snowflake

I have a query like this: It gives this error: Single row subquery returns more than one row. Is there a way to pass a variable in the 3rd argument of dateadd function? Because my cte will return many min_date based on the group by clause. TIA Answer Yes, sub-select in SELECT need to only return one row, you …

Create table in snowflake – Syntax

I am trying to create a table and insert rows into it. But it keeps giving me this syntax error. ERROR : SQL compilation error: syntax error line 3 at position 1 unexpected ‘EventName’. syntax Any help would be appreciated. Answer You need to type those columns, and you are missing a comma after t…