Count rows for each distinct column values in result set and display zeros
I have the following table name type created_at John student 2022-10-01 Tom student 2022-10-02 Susan teacher 2022-10-10 I need a query to get the count for each distinct value in type column in filtered result and display zero’s if no instances of this type exist in result. I tried the following SELECT type, COUNT(*) FROM… Read More Count rows for each distinct column values in result set and display zeros