Modified select() on an existing query example
Hey, I would like to reuse first query with some left joins etc. to obtain results count with second query
I found some posts, and it seems its possible, but cant get it working.
I just need to alternate select() to other fields, more precisely to a simple sql count expression.
https://discord.com/channels/1043890932593987624/1104858040936706140
https://github.com/drizzle-team/drizzle-orm/issues/561
1 Reply
all this to make helper function and avoid manually creating second query like this: