How to write SQL statement for percentage in subtotal and total rows?

How to write SQL statement for percentage in subtotal and total rows?

Getting % on detail rows is no problem, but when trying to get a % on the subtotal or total rows eludes me.

Any help on this would be greatly appreciated. Thanks so much!