So this is example data
TYPE, COUNTRY , TOTAL_SHIPPED
Orange, US, 25
Apple, US , 100
Apple , UK , 25
Orange, SPAIN , 10
Pears , GERMANY , 10
I want to bring back a table that counts the number of Orange Types of there and bring back the SUM of "total_shipped"
So that I get
TYPE, Count( TYPE), SUM()TOTAL_SHIPPED
Orange, 2 , 30
Apple , 2 , 125
Pears , 1 , 10
This should work:
| stats count sum(TOTAL_SHIPPED) by TYPE