Challenge - 5 Problems
QUERY Function Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate2:00remaining
Output of QUERY with simple SELECT
Given a table in range A1:B5 with headers in row 1:
A1: Name
A2: Alice
A3: Bob
A4: Carol
A5: Dave
B1: Score
B2: 85
B3: 90
B4: 78
B5: 92
What is the output of this formula?
A1: Name
A2: Alice
A3: Bob
A4: Carol
A5: Dave
B1: Score
B2: 85
B3: 90
B4: 78
B5: 92
What is the output of this formula?
=QUERY(A1:B5, "SELECT A")Attempts:
2 left
💡 Hint
Remember QUERY includes headers by default.
✗ Incorrect
The QUERY function returns the selected column including the header row. Selecting column A returns the header 'Name' and all names below it.
📊 Formula Result
intermediate2:00remaining
Filtering rows with QUERY
Using the same table as before, what is the output of this formula?
=QUERY(A1:B5, "SELECT A, B WHERE B > 80")Attempts:
2 left
💡 Hint
Look for scores greater than 80 only.
✗ Incorrect
The QUERY filters rows where Score (column B) is greater than 80, including the header row.
❓ Function Choice
advanced2:00remaining
Choosing correct QUERY to sort data
You want to list all names and scores sorted by score descending from the same table.
Which QUERY formula will do this correctly?
Which QUERY formula will do this correctly?
Attempts:
2 left
💡 Hint
The correct syntax uses ORDER BY to sort.
✗ Incorrect
Only option C uses the correct syntax 'ORDER BY B DESC' to sort by score descending.
❓ data_analysis
advanced2:00remaining
Counting rows with QUERY
Using the same table, which QUERY formula returns the number of students with scores above 80?
Attempts:
2 left
💡 Hint
COUNT counts non-empty cells in the selected column.
✗ Incorrect
Option D correctly counts the number of rows where B > 80. The WHERE clause filters first, then COUNT counts.
🎯 Scenario
expert3:00remaining
Extracting unique names with QUERY
You have a table with duplicate names in column A and scores in column B. You want to get a list of unique names only.
Which QUERY formula will produce a list of unique names including the header?
Which QUERY formula will produce a list of unique names including the header?
Attempts:
2 left
💡 Hint
Use GROUP BY to get unique values in QUERY.
✗ Incorrect
QUERY does not support UNIQUE function inside. GROUP BY on column A returns unique names with header.