Another interesting test case for memory management is when grouping by a function that generates new string values maybe using SUBSTR and/or "||".