CTE / WITH + alias

Playground: https://drizzle.run/zb932yr9sv2w1nzn916wzvdt How can i generate the same SQL code (left join "bar" as cte1) without
sql`${cte} as cte1`
sql`${cte} as cte1`
6 Replies
outranker
outrankerā€¢2mo ago
i think you can use table aliases?
function
functionOPā€¢4w ago
for some reason, that link just redirects me to just https://drizzle.run/ D: so i can't see the code you wrote and i've checked out table aliases but as far as i can tell you can't use them for CTEs. šŸ‘€
TOSL
TOSLā€¢4w ago
You have to enable shared playgrounds That's why you can't see it
function
functionOPā€¢3w ago
you mean @outranker, right?
TOSL
TOSLā€¢3w ago
Yea

Did you find this page helpful?