Count with Limit

How can i recreate this select in Drizzle?
select count(*) as total from (select 1 from post WHERE ... limit 1000);
select count(*) as total from (select 1 from post WHERE ... limit 1000);
I want to reuse a query builder to get the total number of results limited to 1000.
1 Reply
Angelelz
Angelelz13mo ago
You can pass the subquery to the .from() no problem.
Want results from more Discord servers?
Add your server