Updated groupAt-function in databseinterface