Hello,
Is there a way to do conditional COUNT()
operations? I would need to count rows, but also apply conditions to them.
This is a simple example that works in Postgres. Is there something similar to it in QuestDB?
select
count(1), -- Count all users
count(1) filter (where gender = 'male'), -- Count male users
count(1) filter (where adult is true) -- Count adult users
from users