Group by node prefix