I need to convert this postgres query to clickhouse:
select count(1) filter (where car_model = 'chevrolet'), count(distinct car_num) filter (where car_model='chevrolet') from cars;
I have tried with countIf, but it does not accept the condition. so I need an option.
What do you mean by it does not accept the condition?
It works as expected:
Query:
Result: