-- Database schema
| Customers : CustomerID [ INTEGER ] primary_key , FirstName [ TEXT ] , MiddleInitial [ TEXT ] , LastName [ TEXT ] | Employees : EmployeeID [ INTEGER ] primary_key , FirstName [ TEXT ] , MiddleInitial [ TEXT ] , LastName [ TEXT ] | Products : ProductID [ INTEGER ] primary_key , Name [ TEXT ] , Price [ REAL ] | Sales : SalesID [ INTEGER ] primary_key , SalesPersonID [ INTEGER ] Sales.SalesPersonID = Employees.EmployeeID , CustomerID [ INTEGER ] Sales.CustomerID = Customers.CustomerID , ProductID [ INTEGER ] Sales.ProductID = Products.ProductID , Quantity [ INTEGER ] |
-- -- What is the total cost of all the "Road-650, Red, 60" products that Abraham E. Bennet sold?

SELECT SUM(T2.Quantity * T3.Price) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Abraham' AND T1.MiddleInitial = 'e' AND T1.LastName = 'Bennet' AND T3.Name = 'Road-650 Red, 60';