I need a formula that will look at a query and tell me which product groups have the most products with zero sales (Top 5).

As a very simple example, if Product Group1 has 10 products, 3 of which have zero sales, Product Group2 has 15 products and 5 of them have zero sales, the formula would return:
1) Product Group2
2) Product Group1.

If that doesn't make sense I will attach an example workbook with what I want. I imagine this will have to be an array formula, but unfortunately I really don't understand how those work. If possible I would like to not use a countif or countifs because they slow down the workbook so much, but if they need to be used, that is fine.

Thanks in advance for any help, and please let me know if you need clarification.

Example Workbook:
example book.xlsx