Sample Data
Sales data with names, categories, and sales amounts.
| Cell | Value |
|---|---|
| A1 | Name |
| B1 | Category |
| C1 | Sales |
| A2 | Alice |
| B2 | Fruit |
| C2 | 10 |
| A3 | Bob |
| B3 | Vegetable |
| C3 | 15 |
| A4 | Charlie |
| B4 | Fruit |
| C4 | 20 |
| A5 | David |
| B5 | Vegetable |
| C5 | 5 |
| A6 | Eve |
| B6 | Fruit |
| C6 | 25 |
Sales data with names, categories, and sales amounts.
| Cell | Value |
|---|---|
| A1 | Name |
| B1 | Category |
| C1 | Sales |
| A2 | Alice |
| B2 | Fruit |
| C2 | 10 |
| A3 | Bob |
| B3 | Vegetable |
| C3 | 15 |
| A4 | Charlie |
| B4 | Fruit |
| C4 | 20 |
| A5 | David |
| B5 | Vegetable |
| C5 | 5 |
| A6 | Eve |
| B6 | Fruit |
| C6 | 25 |
=QUERY(A1:C6, "select B, sum(C) group by B", 1)A B C 1 | Name | Category | Sales | 2 | Alice | Fruit | 10 | 3 | Bob | Vegetable| 15 | 4 | Charlie| Fruit | 20 | 5 | David | Vegetable| 5 | 6 | Eve | Fruit | 25 |
E F 1 | Category | sum | 2 | Fruit | 55 | 3 | Vegetable| 20 |