Query Library GroupBy adaptation