How to count how many rows inside a "group by" group meets a certain criteria

Viewed 3939

I have a table I wish to select data from by grouping the data by using a certain key. For each group I would also like to count how many rows belonging to the group meets a certain criteria. Even if 0 row from that group meets the criteria, I still want to return this group and have a "Count" field display that 0 rows meets the criteria. Because of this, I can't simply filter out undesired rows with a "where" clause and simply select the count of the number of elements inside the group.

Any help would be greatly appreciated

3 Answers
Related