For now in a Query we can group a column selecting only ONE attribute like this :
( ie grouped by Drinks )
- Drinks:
- Coca Cola 1
- Fanta 1
- Water 1
- Fanta 1
- Fanta 1
- Coca Cola 1
If you want this :
- Drinks :
- Coca Cola 2
- Fanta 3
- Water 2
You have to add if this Rule in your BO :
if EXISTS Drinks.Name WHERE Drinks.Name=ThisDrinks.Name AND DrinksID<>ThisDrinksID Then Drinks.Category='Duplicate'
ELSE
Drinks.Category='New'
In your Query put a condition showing only the Category='New' entries.