union or union all in drizzle orm?

SELECT 'meal' as "type" ,count(*) from meal where user_id=''
UNION ALL
SELECT 'deposit' as "type" ,count(*) from deposit where user_id=''
SELECT 'meal' as "type" ,count(*) from meal where user_id=''
UNION ALL
SELECT 'deposit' as "type" ,count(*) from deposit where user_id=''
how to do this in drizzle?
1 Reply
dandadan
dandadan10mo ago
Drizzle ORM - Set Operations
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Want results from more Discord servers?
Add your server