Runs a Google Visualization API Query Language query across data. Learn more
In Google Sheets, QUERY() is a function that allows you to retrieve and filter data from a specified range. The function takes three arguments: data, query, and headers (optional).
The data argument refers to the range of cells that you want to query. This can be a single column or row, or an entire table of data.
The query argument is a string that specifies the filtering criteria for the data. You can use SQL-like syntax to specify conditions, sorting, grouping, and aggregation functions.
The headers argument is an optional boolean value that specifies whether the first row of the data range contains column headers. If set to TRUE or omitted, the headers are used to label the columns in the output. If set to FALSE, the columns are labeled with generic labels like "Col1", "Col2", etc.