SQL query on Northwind multiple tables
<p>From Northwind database I want to get total revenue generated by emplyee sales</p>

<p>Employee -> Orders -> "Order Details"</p>

<p>I am not sure if my solution gives the right data (it was partly guessing)</p>

<pre><code>SELECT 
    Employees.FirstName, Employees.LastName,
    SUM(CONVERT(MONEY, ("Order Details".UnitPrice * Quantity * (1 - Discount) / 100)) * 100) AS ExtendedPrice
FROM 
    ((Orders
INNER JOIN 
    "Order Details" ON Orders.OrderID = "Order Details".OrderID)
INNER JOIN 
    Employees ON Orders.EmployeeID = Employees.EmployeeID)
GROUP BY 
    LastName, FirstName;
</code></pre>

<p><a href="https://northwinddatabase.codeplex.com/" rel="nofollow">Northwind database structure can be found here</a></p>

<p>Thank you in advance. It would be great to have a nice explanation as well</p>