Group clause is not related to sorting. It basically means "all or nothing". The text inside clause is only displayed if any variables inside it expand to non-empty text. The purpose of group clause is to avoid hanging punctuation characters, as in following example:

%T{ (%Y)}

If album title is "Dark Side of the Moon" and year is 1973, the format will expand to "Dark Side of the Moon (1973)". However, if the year is not provided, the same format string will expand to "Dark Side of the Moon". Note that round brackets and space character are omitted in this case because they are inside clause and the only variable inside it (year) is empty.

Andrei