Where Clause - Is used to filter data in table. You can't use aggregate function such as SUM(), COUNT() in a WHERE clause.
Example of where clause with select statement
SELECT
productid,productname,unitprice
FROM products
WHERE unitprice < 18.00
Output
ProductID ProductName UnitPrice
3 Aniseed Syrup 10.00
13 Konbu 6.00
15 Genen Shouyu 15.50
16 Pavlova 17.45
19 Teatime Chocolate Biscuits 9.20
21 Sir Rodney's Scones 10.00
Above example
explains how can we retrieve specific records from a table. We can specify
different conditions in where clause as in above example, It retrieves product
having unit price less than $18.00. We can also specify more than one
conditions in where clause for example
Example 2 : Filtering records using multiple conditions in where clause
SELECT
productid,productname,unitprice
FROM products
WHERE
unitprice < 18.00 AND
(productname like 'a%' OR productname like 'c%')
Output
ProductID ProductName UnitPrice
3 Aniseed Syrup 10.00
48 Chocolade 12.75
Above example explains how we can retrieve data using multiple conditions in where clause. It filters product having unit price less than $18.00 and product name starting from 'a' and 'c' characters.