You can use the following basic syntax to query from multiple sheets in Google Sheets:
=QUERY({Sheet1!A1:C9;Sheet2!A1:C9;Sheet3!A1:C9})
You can also use the following syntax to select specific columns from the sheets:
=QUERY({Sheet1!A1:C9;Sheet2!A1:C9;Sheet3!A1:C9}, "select Col1, Col2")
The following examples show how to use this syntax in practice.
Example 1: Query From Multiple Sheets
Suppose we have the following two sheets called Week1 and Week2 that contain data about basketball players for two different weeks:
We can use the following formula to query data from both sheets and place the results in a new sheet called All_Data:
=QUERY({Week1!A1:C9;Week2!A1:C9})
Here’s how to use the formula in practice:
Notice that all of the data from Week2 is simply stacked underneath the data from Week1.
Example 2: Query & Select Columns From Multiple Sheets
We can use the following formula to query data from both sheets and place the results in a new sheet called All_Data and also select only specific columns to appear in the new sheet:
=QUERY({Week1!A1:C9;Week2!A1:C9}, "select Col1, Col2")
Here’s how to use the formula in practice:
Notice that only the first two columns (“Team” and “Points”) are shown in the final sheet since we specifically chose Col1 and Col2 in our select statement.
Additional Resources
The following tutorials explain how to perform other common queries in Google Sheets:
Google Sheets: How to Select Multiple Columns in Query
Google Sheets: How to Query From Another Sheet
Google Sheets: How to Use Group By in Query
Google Sheets: How to Use Order By in Query