split data by subcategory and attr