Pretty sophisticated election algorithm to deal with regeneration of SKU for the group of rows