-
How would I write this in drizzle:
I tried |
Beta Was this translation helpful? Give feedback.
Answered by
evaogbe
Feb 9, 2025
Replies: 1 comment
-
My problem was that I was ending the subquery with as. // WRONG
await db
.select()
.from(table.customer)
.where(
inArray(
table.customer.country,
db.select({ country: table.supplier.country }).from(table.supplier).as("s")
)
)
// RIGHT
await db
.select()
.from(table.customer)
.where(
inArray(
table.customer.country,
db.select({ country: table.supplier.country }).from(table.supplier)
)
) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
evaogbe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My problem was that I was ending the subquery with as.