As Column Alias
Hello,
I have this drizzle + sqlite (better-sqlite-3) + typescript function, however, it's failing on the part where I use a subquery in the main query.
This is the part that makes the query fail, and works otherwise if I comment it out
My editor intellisense shows that the
shareListIdSubquery
type is SubqueryWithSelection
What may be the reason that the subquery is breaking?2 Replies
I think that if you use the subquery in a clause other than
from
you don't need to alias it
So this subquery should just be:
You're right, removing the
.as()
worked. Thank you!