Is there any way to sum three different things in a column based on two other columns?

Here is an example of what I want to do:

Example.png


Basically I want the totals of a certain fruit from a group, then I want the totals of all other fruits in the group and the the total of everything else.

The tricky part is that I want it based on the group number (order) it is in as shown in the example. Then I want to base it off the type it is in the Type column. Is this possible without VBA coding?

TIA