FILTER clauses
In Postgres 9.4, aggregate functions can take FILTER clauses that replace the functionality previously provided by
sum(case foo when bar then 1 else 0 end)
like so:
count(1) filter (where foo is bar)`
In Postgres 9.4, aggregate functions can take FILTER clauses that replace the functionality previously provided by
sum(case foo when bar then 1 else 0 end)
like so:
count(1) filter (where foo is bar)`