Query: Added stats class to group values by category.