count for each of the distinct values in postgresql code example
Example: postgres count distinct
SELECT
COUNT(DISTINCT column)
FROM
table_name
WHERE
condition;
SELECT
COUNT(DISTINCT column)
FROM
table_name
WHERE
condition;