The Google Sheets QUERY function's WHERE clause assists to specify one or more conditions to extract data from a range. WHERE can be used with column labels or with operators. These are contains, starts with, ends with, matches, and like.
For an intro to QUERY function, please refer to the tutorial How to Use Query in Google Sheets whose link is given below.
-------------------------------------
How to Use QUERY in Google Sheets?
QUERY helps, among others, to extract specific or all data from a range:
• Google Sheets | QUERY | Function | Ex...
-------------------------------------
How to Use XLOOKUP to Extract Multiple Values in Google Sheets?
XLOOKUP can return a single row or column with the search key:
• Google Sheets | XLOOKUP | Function | ...
-------------------------------------
How to Use VLOOKUP in Google Sheets?
Use VLOOKUP to get a single value:
• VLOOKUP Google Sheets | How to Use VL...
-------------------------------------
How to Use IFS in Google Sheets?
IFS allow multiple logical expressions:
• Google Sheets IFS | Test Multiple Con...
-------------------------------------
How to Use IF in Google Sheets?
Use IF to compare one value with another:
• Google Sheets IF | Tutorial | IF Goog...
-------------------------------------
How to Use IF with AND in Google Sheets?
Use IF with AND to Use Multiple Logical Expressions in IF:
• Google Sheets | IF | AND | Function |...
-------------------------------------
How to Create a Pivot Table in Google Sheets?
Create a pivot table for calculation and in-depth data analysis:
• Google Sheets | Pivot Table | How to ...
-------------------------------------
Which one to Use? A Pivot Table, or COUNTBLANK Function, to Count Blank Cells in Google Sheets:
Gives steps to use a pivot table or COUNTBLANK to count blank cells:
• Google Sheets | Pivot Table or COUNTB...
-------------------------------------
How to Use a Pivot Table to Sum by Rows or Columns without using Formula in Google Sheets?
Sum numbers by rows and or columns easily, using a pivot table:
• Google Sheets | Pivot Table | Sum by ...
-------------------------------------
How to Create a Pivot Table to Get Maximum Value without Using Formula in Google Sheets?
A pivot table assists to get the maximum value in a data range without using a formula:
• Google Sheets | Pivot Table | How to ...
-------------------------------------
The format of the QUERY function formula is:
=QUERY(data, query, [headers])
The WHERE clause should be used with the query part of the formula.
Let's look at some examples:
Example 1
Assume columns A, B, C, D, and E have part number, part name, inventory, unit price and total price respectively in the range A2 to E10. Say you want to extract data on parts whose inventory is equal to 100.
The QUERY function formula is:
=QUERY(A2:E10, "select * WHERE C=100")
Example 2
With ref. to the same data above, assume you want to get the data on parts whose inventory is equal to 100 and total price is equal to Rs. 100000.
The QUERY function formula is:
=QUERY(A2:E10, "select * WHERE (C=100 and E=10000))
Review this video tutorial, which gives the step to use the Google Sheets
QUERY function with the WHERE clause to extract data, with examples.