Tuesday, February 14, 2023

Query Formula – 3 in Google Sheet

Query Formula – 3 in Google Sheet

In Google Sheets, the QUERY formula can be used with various parameters to filter, sort, and manipulate data from a specified range or table. Here is an example of the QUERY formula with three parameters:

=QUERY(data, query, [headers])
  1. data: the range or table of data that you want to query.
  2. query: the SQL-like query that specifies what data to retrieve and how to filter, sort, or group it.
  3. headers: an optional parameter that indicates the number of header rows to include in the result.
For instance, to retrieve data from a range named "Sales" and filter it to show only rows where the value in column A is greater than 100, sort the results by column B in descending order, and display the results with column headers, you can use the following formula:

=QUERY(Sales, "SELECT * WHERE A > 100 ORDER BY B DESC", 1)

This formula retrieves the entire rows (*) that meet the condition, orders them by column B in descending order (DESC), and includes one header row in the result.

No comments:

Post a Comment

यह तन विष की बेलरी, गुरु अमृत की खान। शीश दियो जो गुरु मिले, तो भी सस्ता जान।। इसका अर्थ?

 यह दोहा संत कबीरदास जी का है और इसका अर्थ बहुत ही गहरा और प्रेरणादायक है: दोहा: "यह तन विष की बेलरी, गुरु अमृत की खान। शीश दियो जो...