Introduction
The FILTER clause helps you count or sum only certain rows that meet a condition, making your results clearer and more useful.
You want to count how many orders were made by each customer, but only those above $100.
You want to find the total sales for each product, but only for sales in the last month.
You want to count how many students passed and how many failed in one query.
You want to calculate average ratings for a product, but only from verified buyers.