Recall & Review
beginner
What does the ORDER BY clause do in Google Sheets QUERY function?
It sorts the rows of data returned by the QUERY function based on one or more columns, either in ascending or descending order.
Click to reveal answer
beginner
How do you sort data in descending order using ORDER BY in Google Sheets QUERY?
Add the keyword DESC after the column name or column number in the ORDER BY clause. For example: ORDER BY Col2 DESC sorts by the second column from highest to lowest.
Click to reveal answer
beginner
In the formula =QUERY(A1:C10, "SELECT A, B ORDER BY B ASC"), what does ORDER BY B ASC do?
It sorts the results by column B in ascending order (from smallest to largest or A to Z).
Click to reveal answer
intermediate
Can you order by multiple columns in Google Sheets QUERY? How?
Yes. You list columns separated by commas in the ORDER BY clause. For example: ORDER BY Col2 ASC, Col3 DESC sorts first by column 2 ascending, then by column 3 descending.
Click to reveal answer
beginner
What happens if you omit ASC or DESC in the ORDER BY clause?
The data is sorted in ascending order by default.
Click to reveal answer
Which keyword sorts data from largest to smallest in ORDER BY?
✗ Incorrect
DESC means descending order, which sorts data from largest to smallest.
In QUERY, how do you sort by the first column in ascending order?
✗ Incorrect
Use ORDER BY Col1 ASC to sort by the first column ascending. 'Col1' refers to the first column.
What is the default sort order if you write ORDER BY Col3 without ASC or DESC?
✗ Incorrect
If ASC or DESC is omitted, ascending order is the default.
How do you sort by column 2 ascending and then column 3 descending?
✗ Incorrect
List columns in order with ASC or DESC after each: ORDER BY Col2 ASC, Col3 DESC.
Which formula correctly sorts data in range A1:B10 by column B descending?
✗ Incorrect
ORDER BY B DESC sorts by column B in descending order.
Explain how to use the ORDER BY clause in Google Sheets QUERY to sort data by one or more columns.
Think about sorting a list by one or two columns with directions.
You got /4 concepts.
Describe what happens if you omit ASC or DESC in the ORDER BY clause in a QUERY formula.
What is the usual default sorting order in lists?
You got /3 concepts.