Table of Contents
The Label clause is a feature in Google Sheets Query that allows users to assign custom names to specific data or columns in their query results. This can be useful for organizing and identifying data, especially when dealing with large datasets. By using the Label clause, users can easily reference and manipulate their data in a more efficient and organized manner. Additionally, the Label clause can also be used to create more descriptive and visually appealing charts and graphs from the query results. Overall, the Label clause in Google Sheets Query provides a convenient and customizable way to manage and present data.
Google Sheets Query: Use the Label Clause
You can use the label clause in a Google Sheets query to create specific labels for the results of certain columns.
You can use the following syntax to create a specific label for one column within a query:
=QUERY(A1:C13,"select * label A 'Column A'")
In this example, we select all columns in the range A1:C13 and we label column A as ‘Column A’ in the resulting output.
You can also use the following syntax to create specific labels for multiple columns within a query:
=QUERY(A1:C13,"select * label A 'A Column', B 'B Column'")
The following examples show how to use these formulas in practice.
Example 1: Use Label Clause with One Column
We can use the following formula to select the Team, Points, and Rebounds columns, then label the ‘Team’ column as ‘Team Name’ in the output:

Notice that the ‘Team’ column has been renamed, but the ‘Points’ and ‘Rebounds’ columns retained their original names.
Example 2: Use Label Clause with Multiple Columns
We can use the following formula to select the Team, Points, and Rebounds columns, then label the ‘Team’ column as ‘Team Name’ and ‘Points’ column as ‘Points Scored’ in the output:

In this example, we used the label clause to rename two columns in the output but we can use this exact same syntax to rename any number of columns that we’d like.
The following tutorials explain how to perform other common operations with Google Sheets queries:
Cite this article
stats writer (2024). How can the Label clause be used in a Google Sheets Query?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-the-label-clause-be-used-in-a-google-sheets-query/
stats writer. "How can the Label clause be used in a Google Sheets Query?." PSYCHOLOGICAL SCALES, 15 May. 2024, https://scales.arabpsychology.com/stats/how-can-the-label-clause-be-used-in-a-google-sheets-query/.
stats writer. "How can the Label clause be used in a Google Sheets Query?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-the-label-clause-be-used-in-a-google-sheets-query/.
stats writer (2024) 'How can the Label clause be used in a Google Sheets Query?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-the-label-clause-be-used-in-a-google-sheets-query/.
[1] stats writer, "How can the Label clause be used in a Google Sheets Query?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, May, 2024.
stats writer. How can the Label clause be used in a Google Sheets Query?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
