select AirlineId, count(*) filter (where OriginStateName = 'xyz') from airlineStats group by AirlineId limit 10 - This query does not produce any result.
select AirlineId, count(*) filter (where OriginStateName = 'xyz'), count(*) from airlineStats group by AirlineId limit 10 - Here added one more aggregation, now it will produce the result, and "aggregation with filter" column will have value as 0 in all rows.
select AirlineId, count(*) filter (where OriginStateName = 'xyz') from airlineStats group by AirlineId limit 10 and select AirlineId, count(*) from airlineStats where OriginStateName = 'xyz' group by AirlineId limit 10 queries are behaving same, although user expect all matching group keys to return with value as 0