filtre postgresql sur
SELECT COUNT(*) AS [column_name],
COUNT(*) FILTER (WHERE {column_name}{comparison_operator}{VALUE} )
AS [column_name]
FROM TABLE_NAME;
# e.g.
SELECT COUNT(*) AS no_filter,
COUNT(*) FILTER (WHERE id < 6 ) AS with_filter
FROM employee;
Confused Centipede