0
0
Google Sheetsspreadsheet~10 mins

QUERY function basics in Google Sheets - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select all columns from the range A1:C10 using QUERY.

Google Sheets
QUERY(A1:C10, [1])
Drag options to blanks, or click blank then click option'
A"SELECT *"
B"SELECT A"
C"SELECT B"
D"SELECT C"
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the quotes around the query string.
Using column letters without SELECT keyword.
2fill in blank
medium

Complete the code to select only column B from the range A1:C10 using QUERY.

Google Sheets
QUERY(A1:C10, [1])
Drag options to blanks, or click blank then click option'
A"SELECT C"
B"SELECT A"
C"SELECT B"
D"SELECT *"
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting the wrong column letter.
Using SELECT * instead of a specific column.
3fill in blank
hard

Fix the error in the QUERY formula to select column A where values are greater than 10.

Google Sheets
QUERY(A1:B10, [1])
Drag options to blanks, or click blank then click option'
A"SELECT A WHERE A > 10"
B"SELECT A WHERE B > 10"
C"SELECT B WHERE A > 10"
D"SELECT B WHERE B > 10"
Attempts:
3 left
💡 Hint
Common Mistakes
Using different columns in SELECT and WHERE clauses.
Forgetting quotes around the query string.
4fill in blank
hard

Fill in the blank to select columns A and C where column C is less than 50.

Google Sheets
QUERY(A1:C20, [1])
Drag options to blanks, or click blank then click option'
A"SELECT A, C WHERE C > 50"
B"SELECT A, B WHERE B < 50"
C"SELECT B, C WHERE C < 50"
D"SELECT A, C WHERE C < 50"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong columns in SELECT or WHERE.
Using > instead of < in the condition.
5fill in blank
hard

Fill in the blank to select column B where column A equals 'Apple' and sort by column B descending.

Google Sheets
QUERY(A1:C30, [1])
Drag options to blanks, or click blank then click option'
A"SELECT B WHERE A = 'Banana' ORDER BY B DESC"
B"SELECT B WHERE A = 'Apple' ORDER BY B DESC"
C"SELECT B WHERE A = 'Apple' ORDER BY B ASC"
D"SELECT A WHERE B = 'Apple' ORDER BY A DESC"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong filter value in WHERE clause.
Sorting in ascending order instead of descending.