0
0
Google Sheetsspreadsheet~5 mins

ORDER BY clause in Google Sheets - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
ADESC
BASC
CSORT
DORDER
In QUERY, how do you sort by the first column in ascending order?
AORDER BY Col1 DESC
BORDER BY A ASC
CORDER BY Col1 ASC
DORDER BY 1 DESC
What is the default sort order if you write ORDER BY Col3 without ASC or DESC?
ANo sorting
BRandom
CDescending
DAscending
How do you sort by column 2 ascending and then column 3 descending?
AORDER BY Col2 DESC, Col3 ASC
BORDER BY Col2 ASC, Col3 DESC
CORDER BY Col3 ASC, Col2 DESC
DORDER BY Col3 DESC, Col2 ASC
Which formula correctly sorts data in range A1:B10 by column B descending?
A=QUERY(A1:B10, "SELECT A, B ORDER BY B DESC")
B=QUERY(A1:B10, "SELECT A, B ORDER BY A DESC")
C=QUERY(A1:B10, "SELECT A, B ORDER BY B ASC")
D=QUERY(A1:B10, "SELECT A, B ORDER BY 1 DESC")
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.