Challenge - 5 Problems
SELECT Clause Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate2:00remaining
Output of SELECT clause with column filtering
Given the data range A1:C4 with headers in row 1, what is the output of this formula?
Data:
A1: Name, B1: Score, C1: Grade
A2: Alice, B2: 45, C2: B
A3: Bob, B3: 75, C3: A
A4: Carol, B4: 60, C4: B+
=QUERY(A1:C4, "SELECT A, C WHERE B > 50")Data:
A1: Name, B1: Score, C1: Grade
A2: Alice, B2: 45, C2: B
A3: Bob, B3: 75, C3: A
A4: Carol, B4: 60, C4: B+
Attempts:
2 left
💡 Hint
Remember SELECT chooses columns, WHERE filters rows.
✗ Incorrect
The formula selects columns A and C only, and filters rows where column B (Score) is greater than 50. Alice has 45, so excluded. Bob and Carol remain with their Name and Grade.
❓ Function Choice
intermediate2:00remaining
Choosing correct SELECT clause for multiple conditions
Which QUERY formula correctly selects Name and Score for rows where Score is between 50 and 80 (inclusive)?
Attempts:
2 left
💡 Hint
Use AND to combine conditions for a range.
✗ Incorrect
Option A correctly uses AND with >= and <= to filter scores between 50 and 80 inclusive. Option A uses OR which includes all rows. Option A uses BETWEEN which is not supported in Google Sheets QUERY. Option A is impossible condition.
❓ data_analysis
advanced2:00remaining
Count rows with specific SELECT and WHERE
Using QUERY on range A1:C6 with headers Name, Score, Grade, which formula returns the count of rows where Grade is 'A'?
Attempts:
2 left
💡 Hint
COUNT(column) counts non-empty values in that column.
✗ Incorrect
COUNT(C) counts non-empty values in column C where Grade = 'A'. COUNT(A) counts names but may be empty if missing. COUNT(*) is not supported in Google Sheets QUERY.
🎯 Scenario
advanced2:00remaining
Selecting and sorting with QUERY
You want to select columns Name and Score from A1:C10 and sort by Score descending. Which QUERY formula achieves this?
Attempts:
2 left
💡 Hint
ORDER BY is the correct syntax for sorting.
✗ Incorrect
Option A uses correct syntax: ORDER BY column DESC. Others have syntax errors or missing keywords.
📊 Formula Result
expert3:00remaining
Output of QUERY with aggregation and GROUP BY
Given data in A1:C7 with columns Name, Department, Salary, what is the output of:
Data:
A2: John, B2: Sales, C2: 5000
A3: Jane, B3: HR, C3: 6000
A4: Mike, B4: Sales, C4: 7000
A5: Anna, B5: HR, C5: 4000
A6: Tom, B6: IT, C6: 3000
A7: Sue, B7: IT, C7: 3500
=QUERY(A1:C7, "SELECT B, SUM(C) GROUP BY B ORDER BY SUM(C) DESC", 1)Data:
A2: John, B2: Sales, C2: 5000
A3: Jane, B3: HR, C3: 6000
A4: Mike, B4: Sales, C4: 7000
A5: Anna, B5: HR, C5: 4000
A6: Tom, B6: IT, C6: 3000
A7: Sue, B7: IT, C7: 3500
Attempts:
2 left
💡 Hint
GROUP BY groups rows by Department, SUM adds salaries, ORDER BY sorts descending.
✗ Incorrect
The formula groups by Department (column B), sums Salary (column C), and orders by sum descending. Sales total 12000, HR 10000, IT 6500.