Skip to content
Advertisement

SQL script within subquery (Big Query)?

Is there a way to have SQL scripts within a subquery ?

For example:

In my case it is not possible to move the variable declaration outside of the subquery. Thanks !

Advertisement

Answer

For this particular example, you could use a CTE to define the parameter values:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement