you might be able to generate groupings/subtotals using the 'SQL Form' tab, or a stored procedure, and then format output accordingly using Kendo UI Hash Templates' IF, ElseIf, Else, functionality.
but I never did it so don't really know.
but something you definitely could do as a work around, is use a process with subprocesses to pre-generate/compile the resultset with subtotal records in it, and then output this to a Custom Query, though it would take more time to generate.
I think your question is one which is best posed to Support.
Bruce with his dabblings in CQ's is going to get to the point where he asks the same question.
As well, there must be others who use CQ's who would like to know.
But something to consider with CQ's is that most often they will not have a grid type output layout conducive to subtotals.
In such cases if Aware had the subtotals option setting then where would the subtotal appear in the flow of output if it was left-to-right-top-to-bottom? (ie. each record as a tile)
As an entire row? As a tile immediately following the previous?