INNER JOIN Operation Example

This example creates two equi-joins: one between the Order Details and Orders tables and another between the Orders and Employees tables. This is necessary because the Employees table doesn't contain sales data, and the Order Details table doesn't contain employee data. The query produces a list of employees and their total sales.

SELECT DISTINCTROW Sum(UnitPrice * Quantity) AS Sales, (FirstName & Chr(32) & LastName) AS Name 
FROM Employees INNER JOIN (Orders INNER JOIN [Order Details] 
ON [Order Details].OrderID = Orders.OrderID ) 
ON Orders.EmployeeID = Employees.EmployeeID 
GROUP BY (FirstName & Chr(32) & LastName);