Sample Data
This table lists people with their names, ages, and cities.
| Cell | Value |
|---|---|
| A1 | Name |
| B1 | Age |
| C1 | City |
| A2 | Alice |
| B2 | 30 |
| C2 | New York |
| A3 | Bob |
| B3 | 25 |
| C3 | Los Angeles |
| A4 | Charlie |
| B4 | 35 |
| C4 | Chicago |
| A5 | Diana |
| B5 | 28 |
| C5 | New York |
This table lists people with their names, ages, and cities.
| Cell | Value |
|---|---|
| A1 | Name |
| B1 | Age |
| C1 | City |
| A2 | Alice |
| B2 | 30 |
| C2 | New York |
| A3 | Bob |
| B3 | 25 |
| C3 | Los Angeles |
| A4 | Charlie |
| B4 | 35 |
| C4 | Chicago |
| A5 | Diana |
| B5 | 28 |
| C5 | New York |
=QUERY(A1:C5, "SELECT Col1, Col2 WHERE Col3 = 'New York'", 1)A B C 1 | Name | Age | City | 2 | Alice | 30 | New York | 3 | Bob | 25 | Los Angeles | 4 | Charlie | 35 | Chicago | 5 | Diana | 28 | New York |
A B 1 | Name | Age | 2 | Alice| 30 | 3 | Diana| 28 |
QUERY function do in Google Sheets?A | B 1 | 10 2 | 20 3 | 30 4 | 40
=QUERY(A1:B4, "SELECT A WHERE B > 20")?=QUERY(A1:C10, "SELECT A WHERE B = 'Apple')"Product | Region | Sales Apple | East | 100 Banana | West | 150 Apple | West | 200 Banana | East | 120 Apple | East | 130 Banana | West | 170
Pass the test and this pattern moves unknown