INNER JOIN returns matching records from both tables, and filtering conditions can then restrict those matching records to the required business criteria.
Filtering joined data helps analysts retrieve only relevant records instead of processing the entire matched dataset.
Find customers from Mumbai who have placed orders greater than ₹50,000.
SELECT
c.CustomerName,
c.City,
o.OrderID,
o.OrderAmount
FROM Customers c
INNER JOIN Orders o
ON c.CustomerID = o.CustomerID
WHERE c.City = 'Mumbai'
AND o.OrderAmount > 50000;
Used in sales analysis, customer reporting, transaction monitoring, and financial analysis.
- INNER JOIN returns matching records.
- WHERE can filter the matched records.
- Multiple filtering conditions can be combined.
- Filters can reference columns from either table.
- Filtering improves query focus and performance when appropriate.
Can INNER JOIN results be filtered?
Yes. WHERE conditions can filter the records returned by an INNER JOIN.
Can a WHERE condition reference both tables?
Yes. WHERE can reference columns from both joined tables.