If you need to manipulate data in Google Sheets, the QUERY function can help! It brings powerful, database-style searching to your spreadsheet, so you can look up and filter your data in any format you like. Runs a Google Visualization API Query Language query across data.
SYNTAX: =QUERY(data, query, [headers])
data - The range of cells to perform the query on.
Each column of data can only hold boolean, numeric (including date/time types) or string values.
In case of mixed data types in a single column, the majority data type determines the data type of the column for query purposes. Minority data types are considered null values.
query - The query to perform, written in the Google Visualization API Query Language
The value for query must either be enclosed in quotation marks or be a reference to a cell containing the appropriate text.
headers - [ OPTIONAL ] - The number of header rows at the top of data. If omitted or set to -1, the value is guessed based on the content of data.
Practice Sheet
The below sheet is view only mode, please make a copy to practice.