# Google Sheets Query Order by: How to use it (Quick & Easy Guide )

In this tutorial, you will learn How to use the By Google Sheets Query Order By.

## Google Sheets Query Order by: Step by Step Guide

• To use the Order by function in Google Sheets Query you can use the below syntax to order the displayed result based on a column.

`=query(A2:C10, "select A, B order by B asc", 1)`

In the above example sntax we are selecting two columns A and B and order the displayed result in ascending order by Column B.Value 1 in the syntax indicates the header row in the dataset

• To order multiple columns you can use the following syntax
`=query(A2:C10, "select A, B order by B asc, A desc", 1)`

In the above example syntax we are selecting two columns and order the displayed result in ascending order for column B and descending order for Column A.

Enclosed are the steps to use Order by function in Google Sheets with examples

## Use Order by function to sort one column in descending order

You can use below formula to select all columns and sort the results in descending order for Points Column

`=query(A2:C10,"select A,B,C order by C desc", 1)`

Below is the result after using the above query in cell E2.

## Use Order by function to sort one column in ascending order

You can use below formula to select the Teams and Player columns and sort the results in ascending order for Teams

`=query(A2:C10, "select A, B order by A asc", 1)`

## Use Order by function to sort multiple columns

You can use the below formula to choose all columns in the dataset and order the displayed result by Players in ascending and Points in descending order.

`=query(A2:C10, "select * order by B asc, C desc", 1)`

## Google Sheets Query Order by(Conclusion)

In the above tutorial we have provided you various examples with formulas using which your use the Order by function in Google Sheets.

We hope this tutorial on Google Sheets Query Order by was useful

Related articles :

How to Sum by Year in Google Sheets ( Quick & Easy Guide )

How to Sum by Months in Google Sheets ( Quick & Easy Guide )

How to use DEVSQ Function in Google Sheets(Quick & Easy Guide )

How to Calculate Square Root and Cube Root in Google Sheets(Quick & Easy Guide)