I have a user defined function which returns number, argument is also a number. There is an aggregate function(sum()) inside the UDF. I am calling this UDF from a select clause. It's giving me the error "Unsupported subquery type cannot be evaluated".
Basically i am rewriting the query used in SQL server DB. But it seems like snowflake doesn't support this case as it is. How can i rewrite it for snowflake? The queries loos like:
Query:
select salesNumber, date , totalValue(SalesId) from salesTable totalValue UDF body:
select sum(amount) from SalesItems where SalesId=parameter_salesId