Count with Limit

How can i recreate this select in Drizzle?

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.
Was this page helpful?