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 |
GROUP BY clause do in a Google Sheets QUERY function?A | B
--|--
Cat | 2
Dog | 3
Cat | 4
Dog | 1
Bird | 5=QUERY(A1:B5, 'SELECT A, SUM(B) GROUP BY A ORDER BY SUM(B) DESC')=QUERY(A1:C10, 'SELECT A, C, COUNT(B) GROUP BY A')Region, Salesperson, and Amount. You want to find the total sales per region but only include regions where total sales exceed 1000. Which QUERY formula achieves this?Pass the test and this pattern moves unknown