CORE: add group-by.